Class: OpenEHR::RM::DataTypes::Text::DvText
- Inherits:
-
Basic::DataValue
- Object
- Basic::DataValue
- OpenEHR::RM::DataTypes::Text::DvText
- Defined in:
- lib/open_ehr/rm/data_types/text.rb
Overview
of CodePhrase
Direct Known Subclasses
Constant Summary
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#formatting ⇒ Object
Returns the value of attribute formatting.
-
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
-
#language ⇒ Object
Returns the value of attribute language.
-
#mappings ⇒ Object
Returns the value of attribute mappings.
Attributes inherited from Basic::DataValue
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ DvText
constructor
A new instance of DvText.
- #value=(value) ⇒ Object
Methods inherited from Basic::DataValue
Constructor Details
#initialize(args = {}) ⇒ DvText
Returns a new instance of DvText.
88 89 90 91 92 93 94 95 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 88 def initialize(args = {}) super(args) self.formatting = args[:formatting] self.encoding = args[:encoding] self.mappings = args[:mappings] self.language = args[:language] self.hyperlink = args[:hyperlink] end |
Instance Attribute Details
#encoding ⇒ Object
Returns the value of attribute encoding.
84 85 86 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 84 def encoding @encoding end |
#formatting ⇒ Object
Returns the value of attribute formatting.
84 85 86 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 84 def formatting @formatting end |
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
84 85 86 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 84 def hyperlink @hyperlink end |
#language ⇒ Object
Returns the value of attribute language.
84 85 86 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 84 def language @language end |
#mappings ⇒ Object
Returns the value of attribute mappings.
84 85 86 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 84 def mappings @mappings end |
Instance Method Details
#value=(value) ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/open_ehr/rm/data_types/text.rb', line 97 def value=(value) if value.nil? or value.empty? or value.include? CR or value.include? LF raise ArgumentError, "value is not valid" # CR and LF are defined in Basic_Definition inherited DataValue. end @value = value end |