Class: Lifeapi::Activity
- Inherits:
-
Object
- Object
- Lifeapi::Activity
- Defined in:
- lib/lifeapi.rb
Overview
contains a single activity type: the type of activity (run, read, sleep, etc) duration: the duration of the activity in minutes
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, duration) ⇒ Activity
constructor
A new instance of Activity.
Constructor Details
#initialize(type, duration) ⇒ Activity
Returns a new instance of Activity.
38 39 40 41 |
# File 'lib/lifeapi.rb', line 38 def initialize(type, duration) self.self_type = type self.duration = duration end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
36 37 38 |
# File 'lib/lifeapi.rb', line 36 def duration @duration end |
#type ⇒ Object
Returns the value of attribute type.
36 37 38 |
# File 'lib/lifeapi.rb', line 36 def type @type end |