Class: OpenEHR::AQL::Binding

Inherits:
Struct
  • Object
show all
Defined in:
lib/openehr/aql/engine/binding.rb

Overview

A single row-candidate produced while walking the FROM clause's containment tree: the Dataset::EHRRecord it came from (for "e/..." root paths) plus the RM objects bound to each FROM variable so far (e.g. => a_composition, "o" => an_observation).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ehr_recordObject

Returns the value of attribute ehr_record

Returns:

  • (Object)

    the current value of ehr_record



7
8
9
# File 'lib/openehr/aql/engine/binding.rb', line 7

def ehr_record
  @ehr_record
end

#variablesObject

Returns the value of attribute variables

Returns:

  • (Object)

    the current value of variables



7
8
9
# File 'lib/openehr/aql/engine/binding.rb', line 7

def variables
  @variables
end

Instance Method Details

#[](name) ⇒ Object



8
9
10
# File 'lib/openehr/aql/engine/binding.rb', line 8

def [](name)
  variables.fetch(name) { raise SemanticError, "unbound variable: #{name.inspect}" }
end