lib/hermod/xml_node.rb
def to_xml
      if value.respond_to? :to_xml
        value.to_xml
      else
        XML::Node.new(@name, @value).tap do |node|
          @attributes.each do |attribute_name, attribute_value|
            node[attribute_name] = attribute_value if attribute_value.present?
          end
        end
      end
    end
# Internal: turns the XmlNode into an XML::Node including any attributes
# without any sanitisation (currently - this may change in a future
# version).
#
# Returns an XML::Node built from the XmlNode object.
turns the XmlNode into an XML::Node including any attributes
without any sanitisation (currently - this may change in a future
version).

Returns an XML::Node built from the XmlNode object.
turns the XmlNode into an XML :: Node including any attributes without any sanitisation ( currently - this may change in a future version ) . Returns an XML :: Node built from the XmlNode object .
def to_xml
      if value.respond_to? :to_xml
        value.to_xml
      else
        XML::Node.new(@name, @value).tap do |node|
          @attributes.each do |attribute_name, attribute_value|
            node[attribute_name] = attribute_value if attribute_value.present?
          end
        end
      end
    end
def to_xml if value . respond_to? :to_xml value . to_xml else XML :: Node . new ( @name , @value ) . tap do | node | @attributes . each do | attribute_name , attribute_value | node [ attribute_name ] = attribute_value if attribute_value . present? end end end end
Internal: turns the XmlNode into an XML::Node including any attributes
without any sanitisation (currently - this may change in a future
version).
Internal : turns the XmlNode into an XML :: Node including any attributes without any sanitisation ( currently - this may change in a future version ) .