Class: FbGraph::AppRequest
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#data ⇒ Object
Returns the value of attribute data.
-
#from ⇒ Object
Returns the value of attribute from.
-
#message ⇒ Object
Returns the value of attribute message.
-
#to ⇒ Object
Returns the value of attribute to.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ AppRequest
constructor
A new instance of AppRequest.
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ AppRequest
Returns a new instance of AppRequest.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fb_graph/app_request.rb', line 6 def initialize(identifier, attributes = {}) super @data = attributes[:data] @message = attributes[:message] if attributes[:from] @from = User.new(attributes[:from][:id], attributes[:from]) end if attributes[:to] @to = User.new(attributes[:to][:id], attributes[:to]) end if attributes[:application] @application = Application.new(attributes[:application][:id], attributes[:application]) end if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def application @application end |
#created_time ⇒ Object
Returns the value of attribute created_time.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def created_time @created_time end |
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def data @data end |
#from ⇒ Object
Returns the value of attribute from.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def @message end |
#to ⇒ Object
Returns the value of attribute to.
4 5 6 |
# File 'lib/fb_graph/app_request.rb', line 4 def to @to end |