Class: OpenEHR::RM::DataTypes::Quantity::DvOrdinal
- Inherits:
-
DvOrdered
- Object
- Basic::DataValue
- DvOrdered
- OpenEHR::RM::DataTypes::Quantity::DvOrdinal
- Defined in:
- lib/openehr/rm/data_types/quantity.rb
Constant Summary
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary collapse
-
#limits ⇒ Object
Returns the value of attribute limits.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from DvOrdered
#normal_range, #normal_status, #other_reference_ranges
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(args = {}) ⇒ DvOrdinal
constructor
A new instance of DvOrdinal.
- #is_strictly_comparable_to?(others) ⇒ Boolean
Methods inherited from DvOrdered
Methods inherited from Basic::DataValue
Constructor Details
#initialize(args = {}) ⇒ DvOrdinal
Returns a new instance of DvOrdinal.
106 107 108 109 110 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 106 def initialize(args = {}) super(args) self.symbol = args[:symbol] self.limits = args[:limits] end |
Instance Attribute Details
#limits ⇒ Object
Returns the value of attribute limits.
104 105 106 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 104 def limits @limits end |
#symbol ⇒ Object
Returns the value of attribute symbol.
104 105 106 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 104 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value.
104 105 106 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 104 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
122 123 124 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 122 def <=>(other) @value <=> other.value end |
#is_strictly_comparable_to?(others) ⇒ Boolean
133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 133 def is_strictly_comparable_to?(others) unless super(others) return false end unless others.symbol.defining_code.terminology_id.value == @symbol.defining_code.terminology_id.value return false else return true end end |