Class: RunKeeper::Activity

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Activity

Returns a new instance of Activity.



6
7
8
9
# File 'lib/run_keeper/activity.rb', line 6

def initialize attributes = {}
  super
  self.id = uri.split('/').last.to_i if uri
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



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

def duration
  @duration
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#start_timeObject

Returns the value of attribute start_time.



4
5
6
# File 'lib/run_keeper/activity.rb', line 4

def start_time
  @start_time
end

#total_distanceObject

Returns the value of attribute total_distance.



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

def total_distance
  @total_distance
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#uriObject

Returns the value of attribute uri.



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

def uri
  @uri
end