Class: Fitreader::FieldData
- Inherits:
-
Object
- Object
- Fitreader::FieldData
- Defined in:
- lib/fitreader/field_data.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw_value ⇒ Object
Returns the value of attribute raw_value.
-
#valid ⇒ Object
Returns the value of attribute valid.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(id, raw_value, type) ⇒ FieldData
constructor
A new instance of FieldData.
Constructor Details
#initialize(id, raw_value, type) ⇒ FieldData
Returns a new instance of FieldData.
5 6 7 8 9 10 11 12 13 |
# File 'lib/fitreader/field_data.rb', line 5 def initialize(id, raw_value, type) @id = id @raw_value = raw_value unless type.nil? process_type(raw_value, type) else puts "nil type #{id} - #{raw_value}" end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/fitreader/field_data.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/fitreader/field_data.rb', line 3 def name @name end |
#raw_value ⇒ Object
Returns the value of attribute raw_value.
3 4 5 |
# File 'lib/fitreader/field_data.rb', line 3 def raw_value @raw_value end |
#valid ⇒ Object
Returns the value of attribute valid.
3 4 5 |
# File 'lib/fitreader/field_data.rb', line 3 def valid @valid end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/fitreader/field_data.rb', line 3 def value @value end |