Class: FbGraph::Status
- Includes:
- Connections::Comments
- Defined in:
- lib/fb_graph/status.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#message ⇒ Object
Returns the value of attribute message.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, options = {}) ⇒ Status
constructor
A new instance of Status.
Methods included from Connections::Comments
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(identifier, options = {}) ⇒ Status
Returns a new instance of Status.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fb_graph/status.rb', line 7 def initialize(identifier, = {}) super if (from = [:from]) @from = if from[:category] FbGraph::Page.new(from.delete(:id), from) else FbGraph::User.new(from.delete(:id), from) end end @message = [:message] if (updated_time = .delete(:updated_time)) @updated_time = Time.parse(updated_time).utc end end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/fb_graph/status.rb', line 5 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/fb_graph/status.rb', line 5 def @message end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
5 6 7 |
# File 'lib/fb_graph/status.rb', line 5 def updated_time @updated_time end |