class OpenEHR::RM::DataTypes::Quantity::DvOrdinal
Attributes
limits[R]
symbol[R]
value[R]
Public Class Methods
new(args = {})
click to toggle source
Calls superclass method
OpenEHR::RM::DataTypes::Quantity::DvOrdered::new
# File lib/open_ehr/rm/data_types/quantity.rb, line 108 def initialize(args = {}) super(args) self.symbol = args[:symbol] self.limits = args[:limits] end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/open_ehr/rm/data_types/quantity.rb, line 124 def <=>(other) @value <=> other.value end
is_strictly_comparable_to?(others)
click to toggle source
Calls superclass method
OpenEHR::RM::DataTypes::Quantity::DvOrdered#is_strictly_comparable_to?
# File lib/open_ehr/rm/data_types/quantity.rb, line 135 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
limits=(limits)
click to toggle source
# File lib/open_ehr/rm/data_types/quantity.rb, line 128 def limits=(limits) unless limits.nil? or limits.meaning.value == 'limits' raise ArgumentError, 'invalid limits' else @limits = limits end end
symbol=(symbol)
click to toggle source
# File lib/open_ehr/rm/data_types/quantity.rb, line 119 def symbol=(symbol) raise ArgumentError,'symbol should not be nil' if symbol.nil? @symbol = symbol end
value=(value)
click to toggle source
# File lib/open_ehr/rm/data_types/quantity.rb, line 114 def value=(value) raise ArgumentError, 'value should not be nil' if value.nil? @value = value end