Class: Teambox::Activity
- Defined in:
- lib/teambox-client/models/activity.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#comment_target ⇒ Object
The target of the comment if this is a Teambox::Comment.
-
#project ⇒ Object
The Teambox::Project this activity belongs to.
-
#target ⇒ Object
The Teambox::Resource which generated this activity.
-
#url ⇒ Object
:nodoc:.
-
#user ⇒ Object
Teambox::User who generated this activity.
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
#comment_target ⇒ Object
The target of the comment if this is a Teambox::Comment
19 20 21 |
# File 'lib/teambox-client/models/activity.rb', line 19 def comment_target get_or_make_reference(@data['comment_target_type'], @data, 'comment_target_id') end |
#project ⇒ Object
The Teambox::Project this activity belongs to
14 15 16 |
# File 'lib/teambox-client/models/activity.rb', line 14 def project get_or_make_reference('Project', @data, 'project_id') end |
#target ⇒ Object
The Teambox::Resource which generated this activity
9 10 11 |
# File 'lib/teambox-client/models/activity.rb', line 9 def target get_or_make_reference(@data['target_type'], @data, 'target_id') end |
#url ⇒ Object
:nodoc:
23 24 25 |
# File 'lib/teambox-client/models/activity.rb', line 23 def url #:nodoc: "/activities/#{@data['id']}" end |
#user ⇒ Object
Teambox::User who generated this activity
4 5 6 |
# File 'lib/teambox-client/models/activity.rb', line 4 def user get_or_make_reference('User', @data, 'user_id') end |