Class: FbGraph::Thread
- Inherits:
-
Node
- Object
- Node
- FbGraph::Thread
- Includes:
- Connections::FormerParticipants, Connections::Messages, Connections::Participants, Connections::Senders, Connections::Tags
- Defined in:
- lib/fb_graph/thread.rb
Defined Under Namespace
Classes: BeforeTransition
Instance Attribute Summary (collapse)
-
- (Object) message_count
Returns the value of attribute message_count.
-
- (Object) snippet
Returns the value of attribute snippet.
-
- (Object) unread_count
Returns the value of attribute unread_count.
-
- (Object) updated_time
Returns the value of attribute updated_time.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary (collapse)
-
- (Thread) initialize(identifier, attributes = {})
constructor
A new instance of Thread.
Methods included from Connections::Tags
Methods included from Connections::Senders
Methods included from Connections::FormerParticipants
Methods included from Connections::Participants
Methods included from Connections::Messages
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
- (Thread) initialize(identifier, attributes = {})
A new instance of Thread
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fb_graph/thread.rb', line 11 def initialize(identifier, attributes = {}) super @snippet = attributes[:snippet] @message_count = attributes[:message_count] @unread_count = attributes[:unread_count].to_i if attributes[:updated_time] @updated_time = Time.parse(attributes[:updated_time]).utc end # cached connection cache_collections attributes, :messages, :participants, :former_participants, :senders, :tags end |
Instance Attribute Details
- (Object) message_count
Returns the value of attribute message_count
9 10 11 |
# File 'lib/fb_graph/thread.rb', line 9 def @message_count end |
- (Object) snippet
Returns the value of attribute snippet
9 10 11 |
# File 'lib/fb_graph/thread.rb', line 9 def snippet @snippet end |
- (Object) unread_count
Returns the value of attribute unread_count
9 10 11 |
# File 'lib/fb_graph/thread.rb', line 9 def unread_count @unread_count end |
- (Object) updated_time
Returns the value of attribute updated_time
9 10 11 |
# File 'lib/fb_graph/thread.rb', line 9 def updated_time @updated_time end |