Class: OpenEHR::RM::DataTypes::URI::DvUri

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

Direct Known Subclasses

DvEhrUri

Constant Summary

Constants included from Support::Definition::BasicDefinition

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

Instance Method Summary collapse

Methods inherited from Basic::DataValue

#==

Constructor Details

#initialize(args = {}) ⇒ DvUri

Returns a new instance of DvUri.



33
34
35
# File 'lib/open_ehr/rm/data_types/uri.rb', line 33

def initialize(args = {})
  self.value = args[:value]
end

Instance Method Details

#fragment_idObject



41
42
43
# File 'lib/open_ehr/rm/data_types/uri.rb', line 41

def fragment_id
  @uri.fragment
end

#pathObject



45
46
47
# File 'lib/open_ehr/rm/data_types/uri.rb', line 45

def path
  @uri.path
end

#queryObject



49
50
51
# File 'lib/open_ehr/rm/data_types/uri.rb', line 49

def query
  @uri.query
end

#schemeObject



53
54
55
# File 'lib/open_ehr/rm/data_types/uri.rb', line 53

def scheme
  @uri.scheme
end

#valueObject



37
38
39
# File 'lib/open_ehr/rm/data_types/uri.rb', line 37

def value
  @value
end

#value=(value) ⇒ Object

Raises:

  • (ArgumentError)


57
58
59
60
# File 'lib/open_ehr/rm/data_types/uri.rb', line 57

def value=(value)
  raise ArgumentError, "value is empty" if value.nil?
  parse(value)
end