Class: OpenEHR::RM::DataTypes::Text::DvText

Inherits:
Basic::DataValue show all
Defined in:
lib/open_ehr/rm/data_types/text.rb

Overview

of CodePhrase

Direct Known Subclasses

DvCodedText

Constant Summary

Constants included from Support::Definition::BasicDefinition

Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF

Instance Attribute Summary collapse

Attributes inherited from Basic::DataValue

#value

Instance Method Summary collapse

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

#encodingObject

Returns the value of attribute encoding.



84
85
86
# File 'lib/open_ehr/rm/data_types/text.rb', line 84

def encoding
  @encoding
end

#formattingObject

Returns the value of attribute formatting.



84
85
86
# File 'lib/open_ehr/rm/data_types/text.rb', line 84

def formatting
  @formatting
end

Returns the value of attribute hyperlink.



84
85
86
# File 'lib/open_ehr/rm/data_types/text.rb', line 84

def hyperlink
  @hyperlink
end

#languageObject

Returns the value of attribute language.



84
85
86
# File 'lib/open_ehr/rm/data_types/text.rb', line 84

def language
  @language
end

#mappingsObject

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