Class: SimpleXml::Range
- Inherits:
-
Object
- Object
- SimpleXml::Range
- Includes:
- Utilities
- Defined in:
- lib/model/types.rb
Overview
Represents a HQMF physical quantity which can have low and high bounds
Constant Summary
Constants included from Utilities
Utilities::MEASURE_ATTRIBUTES_MAP
Instance Attribute Summary collapse
-
#high ⇒ Object
Returns the value of attribute high.
-
#low ⇒ Object
Returns the value of attribute low.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(comparison, quantity, unit, type = nil) ⇒ Range
constructor
A new instance of Range.
- #to_model ⇒ Object
Methods included from Utilities
#attr_val, attr_val, build_value, #children_of, #comments_on, #create_age_timing, #create_birthdate_criteria
Constructor Details
#initialize(comparison, quantity, unit, type = nil) ⇒ Range
Returns a new instance of Range.
61 62 63 64 |
# File 'lib/model/types.rb', line 61 def initialize(comparison, quantity, unit, type=nil) @type = type set_optional_value(comparison, quantity, unit) end |
Instance Attribute Details
#high ⇒ Object
Returns the value of attribute high.
59 60 61 |
# File 'lib/model/types.rb', line 59 def high @high end |
#low ⇒ Object
Returns the value of attribute low.
59 60 61 |
# File 'lib/model/types.rb', line 59 def low @low end |
#type ⇒ Object
Returns the value of attribute type.
59 60 61 |
# File 'lib/model/types.rb', line 59 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
59 60 61 |
# File 'lib/model/types.rb', line 59 def width @width end |
Instance Method Details
#to_model ⇒ Object
66 67 68 69 70 |
# File 'lib/model/types.rb', line 66 def to_model lm = low ? low.to_model : nil hm = high ? high.to_model : nil HQMF::Range.new(type, lm, hm, nil) end |