Created
February 17, 2011 23:25
-
-
Save brandon-beacher/832965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xml/mapping/base' | |
class RawXmlNode < XML::Mapping::SingleAttributeNode | |
def extract_attr_value(xml) | |
raw_xml = '' | |
xml.write(raw_xml) | |
raw_xml | |
end | |
def set_attr_value(xml, value) | |
raise 'Brandon sez you cannot set a raw xml node for now' | |
end | |
end | |
XML::Mapping.add_node_class RawXmlNode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment