Module: SocialStream::Ostatus::Models::Object::ClassMethods
- Defined in:
- lib/social_stream/ostatus/models/object.rb
Instance Method Summary collapse
-
#from_entry!(entry, receiver) ⇒ Object
Creates an new instance from ActivityStreams entry.
Instance Method Details
#from_entry!(entry, receiver) ⇒ Object
Creates an new instance from ActivityStreams entry
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/social_stream/ostatus/models/object.rb', line 8 def from_entry! entry, receiver create! do |obj| obj. = obj. = SocialStream::ActivityStreams.actor_from_entry!(entry) obj.owner = receiver || obj. obj.title = entry.title obj.description = entry.summary || entry.content obj.relation_ids = [ ::Relation::Public.instance.id ] yield obj if block_given? end end |