Class: Fit4Ruby::FileId

Inherits:
FitDataRecord show all
Defined in:
lib/fit4ruby/FileId.rb

Constant Summary

Constants inherited from FitDataRecord

Fit4Ruby::FitDataRecord::RecordOrder

Constants included from BDFieldNameTranslator

BDFieldNameTranslator::BD_DICT

Instance Attribute Summary

Attributes inherited from FitDataRecord

#message, #timestamp

Instance Method Summary collapse

Methods inherited from FitDataRecord

#<=>, #==, #export, #get, #get_as, #get_unit_by_name, #set, #set_field_values, #write

Methods included from BDFieldNameTranslator

#to_bd_field_name

Methods included from Converters

#conversion_factor, #fit_time_to_time, #secsToDHMS, #secsToHM, #secsToHMS, #speedToPace, #time_to_fit_time

Constructor Details

#initialize(field_values = {}) ⇒ FileId

Returns a new instance of FileId.



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fit4ruby/FileId.rb', line 19

def initialize(field_values = {})
  super('file_id')
  @serial_number = 1234567890
  # Ignore the sub-seconds to avoid problems when comparing records.
  @time_created = Time.at(Time.now.to_i)
  @manufacturer = 'development'
  @type = 'activity'
  @product = 0

  set_field_values(field_values)
end