Class: Array
Instance Method Summary collapse
Instance Method Details
#to_objects(&blk) ⇒ Object
3 4 5 6 7 |
# File 'lib/smoke_monster/array_to_object.rb', line 3 def to_objects(&blk) records = blk.call return [] if records.empty? records.map { |record| create_object_for_this_record(record) } end |