Class: RunKeeper::Activity
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#id ⇒ Object
Returns the value of attribute id.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#total_distance ⇒ Object
Returns the value of attribute total_distance.
-
#type ⇒ Object
Returns the value of attribute type.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Activity
constructor
A new instance of Activity.
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
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/run_keeper/activity.rb', line 3 def duration @duration end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/run_keeper/activity.rb', line 3 def id @id end |
#start_time ⇒ Object
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_distance ⇒ Object
Returns the value of attribute total_distance.
3 4 5 |
# File 'lib/run_keeper/activity.rb', line 3 def total_distance @total_distance end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/run_keeper/activity.rb', line 3 def type @type end |
#uri ⇒ Object
Returns the value of attribute uri.
3 4 5 |
# File 'lib/run_keeper/activity.rb', line 3 def uri @uri end |