Method: Representable::XML#to_node
- Defined in:
- lib/representable/xml.rb
#to_node(options = {}) ⇒ Object
Returns a Nokogiri::XML object representing this object.
47 48 49 50 51 52 |
# File 'lib/representable/xml.rb', line 47 def to_node(={}) [:doc] = Nokogiri::XML::Document.new # DISCUSS: why do we need a fresh Document here? root_tag = [:wrap] || representation_wrap() create_representation_with(Node([:doc], root_tag.to_s), , Binding) end |