Module: Crunchbase::ArrayFromList

Included in:
Investment, Milestone
Defined in:
lib/crunchbase/array_from_list.rb

Instance Method Summary collapse

Instance Method Details

#array_from_list(list) ⇒ Object

Takes a list (directly from the JSON hash) and returns an array of instances of the class



5
6
7
# File 'lib/crunchbase/array_from_list.rb', line 5

def array_from_list(list)
    list.map {|l| self.new(l) }
end