Class: Lifeapi::Activity

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#durationObject

Returns the value of attribute duration.



36
37
38
# File 'lib/lifeapi.rb', line 36

def duration
  @duration
end

#typeObject

Returns the value of attribute type.



36
37
38
# File 'lib/lifeapi.rb', line 36

def type
  @type
end