Class: OpenEHR::Parser::CADL::AssumedValueItems

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/open_ehr/parser/cadl_node.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



32
33
34
35
36
37
38
39
40
# File 'lib/open_ehr/parser/cadl_node.rb', line 32

def value
  magnitude, precision = nil
  magnitude = mag.val.value unless mag.empty?
  precision = prec.val.value unless prec.empty?
  OpenEHR::RM::DataTypes::Quantity::DvQuantity.new(
    :units => units.value,
    :magnitude => magnitude,
    :precision => precision)
end