Module: ActiveRemote::Serialization::ClassMethods
- Defined in:
- lib/active_remote/serialization.rb
Instance Method Summary collapse
-
#serialize_records(records) ⇒ Object
Serialize the given records into Active Remote objects.
Instance Method Details
#serialize_records(records) ⇒ Object
Serialize the given records into Active Remote objects.
Examples
records = [ Generic::Remote::TagRequest.new(:name => 'foo') ]
Tag.serialize_records(records) # => [ Tag#{:name => 'foo'} ]
20 21 22 |
# File 'lib/active_remote/serialization.rb', line 20 def serialize_records(records) records.map { |record| instantiate(record.to_hash) } end |