Class: Gowalla::Activity
- Inherits:
-
Object
- Object
- Gowalla::Activity
- Defined in:
- lib/gowalla/activity.rb
Instance Attribute Summary collapse
-
#activity ⇒ Object
Returns the value of attribute activity.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#message ⇒ Object
Returns the value of attribute message.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Activity
constructor
A new instance of Activity.
Constructor Details
#initialize(data = {}) ⇒ Activity
Returns a new instance of Activity.
5 6 7 8 9 10 11 |
# File 'lib/gowalla/activity.rb', line 5 def initialize(data={}) @type = data['type'] @message = data['message'] @user = User.new(data['user']) @created_at = DateTime.parse(data['created_at']) @activity = data['activity'] end |
Instance Attribute Details
#activity ⇒ Object
Returns the value of attribute activity.
3 4 5 |
# File 'lib/gowalla/activity.rb', line 3 def activity @activity end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/gowalla/activity.rb', line 3 def created_at @created_at end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/gowalla/activity.rb', line 3 def @message end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/gowalla/activity.rb', line 3 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/gowalla/activity.rb', line 3 def user @user end |