Class: FbGraph2::OpenGraph::Action

Inherits:
Node
  • Object
show all
Includes:
Edge::Comments, Edge::Likes::LikeeContext
Defined in:
lib/fb_graph2/open_graph/action.rb

Instance Attribute Summary

Attributes inherited from Node

#access_token, #id

Instance Method Summary collapse

Methods included from Edge::Likes::LikeeContext

#assign, #like!, #likes, #unlike!

Methods included from Edge::Comments

#assign, #comment!, #comments

Methods inherited from Node

#authenticate, #destroy, #edge, #edges, #fetch, #update

Methods included from AttributeAssigner

#assign

Constructor Details

#initialize(id, attributes = {}) ⇒ Action

Returns a new instance of Action.



15
16
17
18
19
20
21
# File 'lib/fb_graph2/open_graph/action.rb', line 15

def initialize(id, attributes = {})
  super
  if attributes.include?(:data) && attributes[:data].include?(:object)
    _object_ = attributes[:data][:object]
    self.object = OpenGraph::Object.new _object_[:id], _object_
  end
end