Class: Mapricot::HasManyAssociation
- Inherits:
-
Association
- Object
- Association
- Mapricot::HasManyAssociation
- Defined in:
- lib/mapricot/associations.rb
Constant Summary
Constants inherited from Association
Instance Attribute Summary
Attributes inherited from Association
#name, #namespace, #type, #value
Instance Method Summary collapse
Methods inherited from Association
Constructor Details
This class inherits a constructor from Mapricot::Association
Instance Method Details
#set_value_from_node_list(node_list) ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mapricot/associations.rb', line 87 def set_value_from_node_list(node_list) @value = [] node_list.each do |node| if @type == :xml @value << class_from_name.new(node.to_s) else @value << node.contents end end typecast end |
#singular_name ⇒ Object
83 84 85 |
# File 'lib/mapricot/associations.rb', line 83 def singular_name "#{@name}".singularize end |