Class: OpenEHR::AQL::Model::ClassExpression

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

Overview

classExprOperand's #classExpression alternative:

IDENTIFIER variable=IDENTIFIER? pathPredicate?

A bare RM class name (e.g. "COMPOSITION"), optionally bound to a variable and constrained by a predicate. Until M3 adds archetypePredicate/nodePredicate, predicate can only be a StandardPredicate (or nil).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(class_name:, variable: nil, predicate: nil) ⇒ ClassExpression

Returns a new instance of ClassExpression.



26
27
28
29
30
31
# File 'lib/openehr/aql/model/from_clause.rb', line 26

def initialize(class_name:, variable: nil, predicate: nil)
  @class_name = class_name
  @variable = variable
  @predicate = predicate
  freeze
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



24
25
26
# File 'lib/openehr/aql/model/from_clause.rb', line 24

def class_name
  @class_name
end

#predicateObject (readonly)

Returns the value of attribute predicate.



24
25
26
# File 'lib/openehr/aql/model/from_clause.rb', line 24

def predicate
  @predicate
end

#variableObject (readonly)

Returns the value of attribute variable.



24
25
26
# File 'lib/openehr/aql/model/from_clause.rb', line 24

def variable
  @variable
end