module SocialStream::Ostatus::Models::Object::ClassMethods
Public Instance Methods
from_entry!(entry, receiver) { |obj| ... }
click to toggle source
Creates an new instance from ActivityStreams
entry
# File lib/social_stream/ostatus/models/object.rb, line 8 def from_entry! entry, receiver create! do |obj| obj.author = obj.user_author = SocialStream::ActivityStreams.actor_from_entry!(entry) obj.owner = receiver || obj.author obj.title = entry.title obj.description = entry.summary || entry.content obj.relation_ids = [ ::Relation::Public.instance.id ] yield obj if block_given? end end