Class: FBScrape::Conversation
- Inherits:
-
Object
- Object
- FBScrape::Conversation
- Defined in:
- lib/fb_scrape/conversation.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#page_id ⇒ Object
Returns the value of attribute page_id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #has_more_messages? ⇒ Boolean
-
#initialize(id, page_id, token, load_on_init = true) ⇒ Conversation
constructor
A new instance of Conversation.
- #load_messages ⇒ Object
Constructor Details
#initialize(id, page_id, token, load_on_init = true) ⇒ Conversation
Returns a new instance of Conversation.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fb_scrape/conversation.rb', line 5 def initialize id, page_id, token, load_on_init=true @id = id @page_id = page_id @token = token @page_info = nil @messages = [] if load_on_init end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/fb_scrape/conversation.rb', line 3 def id @id end |
#messages ⇒ Object
Returns the value of attribute messages.
3 4 5 |
# File 'lib/fb_scrape/conversation.rb', line 3 def @messages end |
#page_id ⇒ Object
Returns the value of attribute page_id.
3 4 5 |
# File 'lib/fb_scrape/conversation.rb', line 3 def page_id @page_id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/fb_scrape/conversation.rb', line 3 def updated_at @updated_at end |
Instance Method Details
#has_more_messages? ⇒ Boolean
21 22 23 |
# File 'lib/fb_scrape/conversation.rb', line 21 def @page_info && next_cursor end |
#load_messages ⇒ Object
17 18 19 |
# File 'lib/fb_scrape/conversation.rb', line 17 def end |