Class: OpenEHR::RM::DataTypes::Basic::DvBoolean
- Defined in:
- lib/open_ehr/rm/data_types/basic.rb
Constant Summary
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary
Attributes inherited from DataValue
Instance Method Summary collapse
-
#initialize(args) ⇒ DvBoolean
constructor
A new instance of DvBoolean.
- #value=(value) ⇒ Object
- #value? ⇒ Boolean
Methods inherited from DataValue
Constructor Details
#initialize(args) ⇒ DvBoolean
Returns a new instance of DvBoolean.
26 27 28 |
# File 'lib/open_ehr/rm/data_types/basic.rb', line 26 def initialize(args) super(args) end |
Instance Method Details
#value=(value) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/open_ehr/rm/data_types/basic.rb', line 30 def value=(value) raise ArgumentError, "value must not be nil" if value.nil? if value == true or value =~ /TRUE/i @value = true else @value = false end end |
#value? ⇒ Boolean
39 40 41 |
# File 'lib/open_ehr/rm/data_types/basic.rb', line 39 def value? @value == true end |