class OpenEHR::RM::DataTypes::Quantity::DvOrdinal

Attributes

limits[R]
symbol[R]
value[R]

Public Class Methods

new(args = {}) click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 106
def initialize(args = {})
  super(args)
  self.symbol = args[:symbol]
  self.limits = args[:limits]
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 122
def <=>(other)
  @value <=> other.value
end
is_strictly_comparable_to?(others) click to toggle source
# 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
limits=(limits) click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 126
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/openehr/rm/data_types/quantity.rb, line 117
def symbol=(symbol)
  raise ArgumentError,'symbol should not be nil' if symbol.nil?
  @symbol = symbol
end
value=(value) click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 112
def value=(value)
  raise ArgumentError, 'value should not be nil' if value.nil?
  @value = value
end