Class: Gowalla::Activity

Inherits:
Object
  • Object
show all
Defined in:
lib/gowalla/activity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#activityObject

Returns the value of attribute activity.



3
4
5
# File 'lib/gowalla/activity.rb', line 3

def activity
  @activity
end

#created_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/gowalla/activity.rb', line 3

def created_at
  @created_at
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/gowalla/activity.rb', line 3

def message
  @message
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/gowalla/activity.rb', line 3

def type
  @type
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/gowalla/activity.rb', line 3

def user
  @user
end