Class: OpenEHR::AQL::Model::Containment

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

Overview

containsExpr's "classExprOperand (NOT? CONTAINS containsExpr)?" shape: a right-recursive chain (A CONTAINS B CONTAINS C ...), so child is itself a ClassExpression, another Containment, or (from M7) a ContainmentAnd/ContainmentOr grouping of sibling branches.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent:, child:, negated: false) ⇒ Containment

Returns a new instance of Containment.



12
13
14
15
16
17
# File 'lib/openehr/aql/model/containment.rb', line 12

def initialize(parent:, child:, negated: false)
  @parent = parent
  @child = child
  @negated = negated
  freeze
end

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



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

def child
  @child
end

#negatedObject (readonly) Also known as: negated?

Returns the value of attribute negated.



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

def negated
  @negated
end

#parentObject (readonly)

Returns the value of attribute parent.



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

def parent
  @parent
end