Module: WebService::Aboutme::XmlObjectMapping::ClassMethods
- Defined in:
- lib/webservice/aboutme/xmlobjectmapping.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#attr_array(name, args = {}) ⇒ Object
29 30 31 |
# File 'lib/webservice/aboutme/xmlobjectmapping.rb', line 29 def attr_array(name, args = {}) attr_mapping(name, args.merge(:array => true)) end |
#attr_mapping(name, args = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/webservice/aboutme/xmlobjectmapping.rb', line 12 def attr_mapping(name, args = {}) unless args[:private] attr_accessor name end mapping = { :name => name, :type => args[:type] || :string, :array => args[:array] || false, :subnode => args[:subnode], } path = args[:path] || name.to_s @attributes ||= {} @attributes[path] = mapping end |