Class: FbGraph2::Post
- Defined in:
- lib/fb_graph2/post.rb
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(id, attributes = {}) ⇒ Post
constructor
A new instance of Post.
Methods included from Edge::SharedPosts
Methods included from Edge::Likes::LikeeContext
#assign, #like!, #likes, #unlike!
Methods included from Edge::Insights
Methods included from Edge::Comments
Methods inherited from Node
#authenticate, #destroy, #edge, #edges, #fetch, #update
Methods included from AttributeAssigner
Constructor Details
#initialize(id, attributes = {}) ⇒ Post
Returns a new instance of Post.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fb_graph2/post.rb', line 24 def initialize(id, attributes = {}) super if attributes.include? :message_tags self. = attributes[:message_tags].collect do || TaggedProfile.new [:id], end end if attributes.include? :privacy self.privacy = Struct::Privacy.new attributes[:privacy] end if attributes.include? :properties self.properties = attributes[:properties].collect do |property| Struct::Property.new property end end if attributes.include? :shares self.shares = Struct::Share.new attributes[:shares] end end |