Class: OpenEHR::AM::OpenEHRProfile::DataTypes::Quantity::CQuantityItem
- Inherits:
-
Object
- Object
- OpenEHR::AM::OpenEHRProfile::DataTypes::Quantity::CQuantityItem
- Defined in:
- lib/openehr/am/openehr_profile/data_types/quantity.rb
Instance Attribute Summary collapse
-
#magnitude ⇒ Object
Returns the value of attribute magnitude.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize(args = { }) ⇒ CQuantityItem
constructor
A new instance of CQuantityItem.
- #precision_unconstrained? ⇒ Boolean
Constructor Details
#initialize(args = { }) ⇒ CQuantityItem
Returns a new instance of CQuantityItem.
42 43 44 45 46 |
# File 'lib/openehr/am/openehr_profile/data_types/quantity.rb', line 42 def initialize(args = { }) self.magnitude = args[:magnitude] self.precision = args[:precision] self.units = args[:units] end |
Instance Attribute Details
#magnitude ⇒ Object
Returns the value of attribute magnitude.
39 40 41 |
# File 'lib/openehr/am/openehr_profile/data_types/quantity.rb', line 39 def magnitude @magnitude end |
#precision ⇒ Object
Returns the value of attribute precision.
39 40 41 |
# File 'lib/openehr/am/openehr_profile/data_types/quantity.rb', line 39 def precision @precision end |
#units ⇒ Object
Returns the value of attribute units.
40 41 42 |
# File 'lib/openehr/am/openehr_profile/data_types/quantity.rb', line 40 def units @units end |
Instance Method Details
#precision_unconstrained? ⇒ Boolean
55 56 57 58 59 60 61 |
# File 'lib/openehr/am/openehr_profile/data_types/quantity.rb', line 55 def precision_unconstrained? if @precision.upper == -1 && @precision.lower == -1 return true else return false end end |