Module: Fit::File::Definitions
- Defined in:
- lib/fit/file/definitions.rb
Constant Summary collapse
- @@fields =
Hash.new{ |h,k| h[k]= {} }
- @@names =
Hash.new
Class Method Summary collapse
- .add_field(global_msg_num, field_def_num, name, options = {}) ⇒ Object
- .add_name(global_msg_num, name) ⇒ Object
- .get_field(global_msg_num, field_def_num) ⇒ Object
- .get_name(global_msg_num) ⇒ Object
Class Method Details
.add_field(global_msg_num, field_def_num, name, options = {}) ⇒ Object
9 10 11 |
# File 'lib/fit/file/definitions.rb', line 9 def add_field(global_msg_num, field_def_num, name, = {}) @@fields[global_msg_num][field_def_num] = .merge(:name => name) end |
.add_name(global_msg_num, name) ⇒ Object
17 18 19 |
# File 'lib/fit/file/definitions.rb', line 17 def add_name(global_msg_num, name) @@names[global_msg_num] = name end |
.get_field(global_msg_num, field_def_num) ⇒ Object
13 14 15 |
# File 'lib/fit/file/definitions.rb', line 13 def get_field(global_msg_num, field_def_num) @@fields[global_msg_num][field_def_num] end |
.get_name(global_msg_num) ⇒ Object
21 22 23 |
# File 'lib/fit/file/definitions.rb', line 21 def get_name(global_msg_num) @@names[global_msg_num] end |