Method: XML::Mapping::ClassMethods#all_xml_mapping_nodes

Defined in:
lib/xml/mapping/base.rb

#all_xml_mapping_nodes(options = {:mapping=>nil,:create=>true}) ⇒ Object

enumeration of all nodes in effect when marshalling/unmarshalling this class, that is, nodes defined for this class as well as for its superclasses. The nodes are returned in the order of their definition, starting with the topmost superclass that has nodes defined. keyword arguments are the same as for #xml_mapping_nodes.



394
395
396
397
398
399
400
401
402
# File 'lib/xml/mapping/base.rb', line 394

def all_xml_mapping_nodes(options={:mapping=>nil,:create=>true})
  # TODO: we could return a dynamic Enumerable here, or cache
  # the array...
  result = []
  if superclass and superclass.respond_to?(:all_xml_mapping_nodes)
    result += superclass.all_xml_mapping_nodes options
  end
  result += xml_mapping_nodes options
end