Class: EEML::Data
- Inherits:
-
Object
- Object
- EEML::Data
- Defined in:
- lib/eeml/data.rb
Overview
An EEML data item. A valid EEML::Environment must contain at least one of these.
Instance Attribute Summary collapse
-
#id ⇒ Object
Data value.
-
#max_value ⇒ Object
Maximum value.
-
#min_value ⇒ Object
Minimum value.
-
#tags ⇒ Object
Tag array.
-
#value ⇒ Object
Data value.
Instance Method Summary collapse
-
#initialize(value, options = {}) ⇒ Data
constructor
Create a new EEML::Data item.
-
#unit ⇒ Object
Unit of measurement.
-
#unit=(unit_val) ⇒ Object
Unit of measurement - must be a EEML::Unit object.
Constructor Details
#initialize(value, options = {}) ⇒ Data
Create a new EEML::Data item.
8 9 10 11 12 |
# File 'lib/eeml/data.rb', line 8 def initialize(value, = {}) @value = value @id = [:id] @tags = [] end |
Instance Attribute Details
#id ⇒ Object
Data value
18 19 20 |
# File 'lib/eeml/data.rb', line 18 def id @id end |
#max_value ⇒ Object
Maximum value
27 28 29 |
# File 'lib/eeml/data.rb', line 27 def max_value @max_value end |
#min_value ⇒ Object
Minimum value
24 25 26 |
# File 'lib/eeml/data.rb', line 24 def min_value @min_value end |
#tags ⇒ Object
Tag array
21 22 23 |
# File 'lib/eeml/data.rb', line 21 def @tags end |
#value ⇒ Object
Data value
15 16 17 |
# File 'lib/eeml/data.rb', line 15 def value @value end |
Instance Method Details
#unit ⇒ Object
Unit of measurement
30 31 32 |
# File 'lib/eeml/data.rb', line 30 def unit @unit end |