class OpenEHR::RM::Support::Identification::TerminologyID
Attributes
name[R]
version_id[R]
Public Class Methods
new(args = {})
click to toggle source
Calls superclass method
OpenEHR::RM::Support::Identification::ObjectID::new
# File lib/open_ehr/rm/support/identification.rb, line 155 def initialize(args = {}) if args[:value].nil? self.name = args[:name] self.version_id = args[:version_id] else super(args) end end
Public Instance Methods
name=(name)
click to toggle source
# File lib/open_ehr/rm/support/identification.rb, line 184 def name=(name) raise ArgumentError, "name not valid" if name.nil? or name.empty? @name = name end
value()
click to toggle source
# File lib/open_ehr/rm/support/identification.rb, line 164 def value if @version_id.empty? @name else @name + '(' + @version_id + ')' end end
value=(value)
click to toggle source
# File lib/open_ehr/rm/support/identification.rb, line 173 def value=(value) raise ArgumentError, "value not valid" if value.nil? or value.empty? if /(.*)\((.*)\)/ =~ value self.name = $1 self.version_id = $2 else self.name = value self.version_id = '' end end
version_id=(version_id)
click to toggle source
# File lib/open_ehr/rm/support/identification.rb, line 189 def version_id=(version_id) if version_id.nil? @version_id = '' else @version_id = version_id end end