Class: Joule::Marker

Inherits:
Object
  • Object
show all
Includes:
Hashable
Defined in:
lib/joule/marker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Hashable

#to_hash

Constructor Details

#initialize(options = {}) ⇒ Marker

Returns a new instance of Marker.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/joule/marker.rb', line 27

def initialize(options = {})
  @active = true
  @average_cadence = 0
  @average_heartrate = 0
  @average_power = 0.0
  @average_power_to_weight = 0.0
  @average_speed = 0.0
  @comment = ""
  @duration_seconds = 0
  @distance = 0.0
  options[:end] ? @end = options[:end] : @end = 0
  @energy = 0
  @intensity_factor = 0
  @maximum_cadence = 0
  @maximum_heartrate = 0
  @maximum_power = 0.0
  @maximum_power_to_weight = 0.0
  @maximum_speed = 0.0
  @normalized_power = 0
  options[:start] ? @start = options[:start] : @start = 0 
  @training_stress_score = 0.0
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



5
6
7
# File 'lib/joule/marker.rb', line 5

def active
  @active
end

#average_cadenceObject

Returns the value of attribute average_cadence.



6
7
8
# File 'lib/joule/marker.rb', line 6

def average_cadence
  @average_cadence
end

#average_heartrateObject

Returns the value of attribute average_heartrate.



7
8
9
# File 'lib/joule/marker.rb', line 7

def average_heartrate
  @average_heartrate
end

#average_powerObject

Returns the value of attribute average_power.



8
9
10
# File 'lib/joule/marker.rb', line 8

def average_power
  @average_power
end

#average_power_to_weightObject

Returns the value of attribute average_power_to_weight.



9
10
11
# File 'lib/joule/marker.rb', line 9

def average_power_to_weight
  @average_power_to_weight
end

#average_speedObject

Returns the value of attribute average_speed.



10
11
12
# File 'lib/joule/marker.rb', line 10

def average_speed
  @average_speed
end

#commentObject

Returns the value of attribute comment.



11
12
13
# File 'lib/joule/marker.rb', line 11

def comment
  @comment
end

#distanceObject

Returns the value of attribute distance.



13
14
15
# File 'lib/joule/marker.rb', line 13

def distance
  @distance
end

#duration_secondsObject

Returns the value of attribute duration_seconds.



12
13
14
# File 'lib/joule/marker.rb', line 12

def duration_seconds
  @duration_seconds
end

#endObject

Returns the value of attribute end.



14
15
16
# File 'lib/joule/marker.rb', line 14

def end
  @end
end

#energyObject

Returns the value of attribute energy.



15
16
17
# File 'lib/joule/marker.rb', line 15

def energy
  @energy
end

#intensity_factorObject

Returns the value of attribute intensity_factor.



16
17
18
# File 'lib/joule/marker.rb', line 16

def intensity_factor
  @intensity_factor
end

#maximum_cadenceObject

Returns the value of attribute maximum_cadence.



17
18
19
# File 'lib/joule/marker.rb', line 17

def maximum_cadence
  @maximum_cadence
end

#maximum_heartrateObject

Returns the value of attribute maximum_heartrate.



18
19
20
# File 'lib/joule/marker.rb', line 18

def maximum_heartrate
  @maximum_heartrate
end

#maximum_powerObject

Returns the value of attribute maximum_power.



19
20
21
# File 'lib/joule/marker.rb', line 19

def maximum_power
  @maximum_power
end

#maximum_power_to_weightObject

Returns the value of attribute maximum_power_to_weight.



20
21
22
# File 'lib/joule/marker.rb', line 20

def maximum_power_to_weight
  @maximum_power_to_weight
end

#maximum_speedObject

Returns the value of attribute maximum_speed.



21
22
23
# File 'lib/joule/marker.rb', line 21

def maximum_speed
  @maximum_speed
end

#normalized_powerObject

Returns the value of attribute normalized_power.



22
23
24
# File 'lib/joule/marker.rb', line 22

def normalized_power
  @normalized_power
end

#startObject

Returns the value of attribute start.



23
24
25
# File 'lib/joule/marker.rb', line 23

def start
  @start
end

#training_stress_scoreObject

Returns the value of attribute training_stress_score.



24
25
26
# File 'lib/joule/marker.rb', line 24

def training_stress_score
  @training_stress_score
end