lib/happymapper/anonymous_mapper.rb
#
# Used internally to create and define the necessary happymapper
# elements.
#
Used internally to create and define the necessary happymapper
elements.
Used internally to create and define the necessary happymapper elements .
def create_happymapper_class_from_node(node)
      klass = create_happymapper_class_with_tag(node.name)
      klass.namespace node.namespace.prefix if node.namespace
      node.namespaces.each do |prefix, namespace|
        klass.register_namespace prefix, namespace
      end
      node.attributes.each_value do |attribute|
        define_attribute_on_class(klass, attribute)
      end
      node.children.each do |child|
        define_element_on_class(klass, child)
      end
      klass
    end
def create_happymapper_class_from_node ( node ) klass = create_happymapper_class_with_tag ( node . name ) klass . namespace node . namespace . prefix if node . namespace node . namespaces . each do | prefix , namespace | klass . register_namespace prefix , namespace end node . attributes . each_value do | attribute | define_attribute_on_class ( klass , attribute ) end node . children . each do | child | define_element_on_class ( klass , child ) end klass end
Used internally to create and define the necessary happymapper
elements.
Used internally to create and define the necessary happymapper elements .
node
<not_specific>