Class: GSGraph::Status
- Defined in:
- lib/gs_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, #raw_attributes
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Status
constructor
A new instance of Status.
Methods included from Connections::Likes::Likable
Methods included from Connections::Likes
Methods included from Connections::Comments
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Status
Returns a new instance of Status.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gs_graph/status.rb', line 9 def initialize(identifier, attributes = {}) super if (from = attributes[:from]) @from = if from[:category] Page.new(from[:id], from) else User.new(from[:id], from) end end @message = attributes[:message] if (updated_time = attributes[:updated_time]) @updated_time = Time.parse(updated_time).utc end # cached connection cache_collections attributes, :comments, :likes end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
7 8 9 |
# File 'lib/gs_graph/status.rb', line 7 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/gs_graph/status.rb', line 7 def @message end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
7 8 9 |
# File 'lib/gs_graph/status.rb', line 7 def updated_time @updated_time end |