Class: OpenEHR::AQL::Model::ObjectPath

Inherits:
Object
  • Object
show all
Defined in:
lib/openehr/aql/model/object_path.rb

Overview

objectPath : pathPart (SYM_SLASH pathPart)* ;

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(segments:) ⇒ ObjectPath

Returns a new instance of ObjectPath.



8
9
10
11
# File 'lib/openehr/aql/model/object_path.rb', line 8

def initialize(segments:)
  @segments = segments.freeze
  freeze
end

Instance Attribute Details

#segmentsObject (readonly)

Returns the value of attribute segments.



6
7
8
# File 'lib/openehr/aql/model/object_path.rb', line 6

def segments
  @segments
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/openehr/aql/model/object_path.rb', line 13

def to_s
  segments.map(&:to_s).join('/')
end