Class: Teambox::Conversation
- Defined in:
- lib/teambox-client/models/conversation.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#comments ⇒ Object
Gets a Teambox::ResultSet of all Teambox::Comment objects belonging to the conversation.
-
#first_comment ⇒ Object
First Teambox::Comment of the conversation.
-
#recent_comments ⇒ Object
Last two Teambox::Comment of the conversation (may include first_comment).
-
#url ⇒ Object
:nodoc:.
- #user ⇒ Object
Methods inherited from Resource
#created_at, #destroy, #id, #initialize, #inspect, #method_missing, #next, #prev, #reload, #save, #updated_at
Methods included from ReferenceList
#generate_references, #get_or_make_reference, #get_or_make_references, #get_reference, #set_reference
Constructor Details
This class inherits a constructor from Teambox::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Teambox::Resource
Instance Method Details
#comments ⇒ Object
Gets a Teambox::ResultSet of all Teambox::Comment objects belonging to the conversation
18 19 20 |
# File 'lib/teambox-client/models/conversation.rb', line 18 def comments @list.client.get("#{url}/comments") end |
#first_comment ⇒ Object
First Teambox::Comment of the conversation
13 14 15 |
# File 'lib/teambox-client/models/conversation.rb', line 13 def first_comment get_or_make_reference('Comment', @data, 'first_comment_id') end |
#recent_comments ⇒ Object
Last two Teambox::Comment of the conversation (may include first_comment)
8 9 10 |
# File 'lib/teambox-client/models/conversation.rb', line 8 def recent_comments get_or_make_references('Comment', @data, 'recent_comment_ids') end |
#url ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/teambox-client/models/conversation.rb', line 22 def url #:nodoc: "/conversations/#{@data['id']}" end |
#user ⇒ Object
3 4 5 |
# File 'lib/teambox-client/models/conversation.rb', line 3 def user get_or_make_reference('User', @data, 'user_id') end |