Class: CapsuleCRM::ChildCollection
- Inherits:
-
Collection
- Object
- Array
- Collection
- CapsuleCRM::ChildCollection
- Defined in:
- lib/capsulecrm/child_collection.rb
Instance Method Summary collapse
-
#initialize(parent, klass, data) ⇒ ChildCollection
constructor
nodoc.
Constructor Details
#initialize(parent, klass, data) ⇒ ChildCollection
nodoc
5 6 7 8 9 10 11 |
# File 'lib/capsulecrm/child_collection.rb', line 5 def initialize(parent, klass, data) return if data.nil? [data].flatten.each do |attributes| attributes = klass.attributes_from_xml_hash(attributes) self.push klass.new(parent, attributes) end end |