Class: Gooby::Lap

Inherits:
GoobyObject show all
Defined in:
lib/gooby_lap.rb

Overview

Instances of this class represent a <Lap> aggregate object from a

Forerunner XML file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GoobyKernel

#character_align, #default_delimiter, #invalid_altitude, #invalid_heartbeat, #invalid_latitude, #invalid_longitude, #invalid_time, #project_author, #project_copyright, #project_date, #project_embedded_comment, #project_license, #project_name, #project_version_number, #project_year, #read_as_ascii_lines, #read_lines, #strip_lines, #tokenize

Constructor Details

#initialize(num) ⇒ Lap

Returns a new instance of Lap.



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

def initialize(num)
  @number = num  
end

Instance Attribute Details

#begin_positionObject

Returns the value of attribute begin_position.



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

def begin_position
  @begin_position
end

#durationObject

Returns the value of attribute duration.



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

def duration
  @duration
end

#end_positionObject

Returns the value of attribute end_position.



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

def end_position
  @end_position
end

#lengthObject

Returns the value of attribute length.



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

def length
  @length
end

#numberObject

Returns the value of attribute number.



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

def number
  @number
end

#startTimeObject

Returns the value of attribute startTime.



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

def startTime
  @startTime
end

Instance Method Details

#to_sObject



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

def to_s
  return "Lap: num: #{@number} start: #{@startTime} dur: #{@duration} len: #{@length} begin: #{@begin_position.to_s} end: #{@end_position.to_s}"
end