Class: ActiveFacts::CQL::Compiler::TransformRule

Inherits:
Definition
  • Object
show all
Defined in:
lib/activefacts/cql/compiler/transform_rule.rb

Instance Attribute Summary collapse

Attributes inherited from Definition

#constellation, #tree, #vocabulary

Instance Method Summary collapse

Methods inherited from Definition

#all_bindings_in_clauses, #build_all_steps, #build_step, #build_variables, #source, #to_s

Constructor Details

#initialize(compound_matching) ⇒ TransformRule

Returns a new instance of TransformRule.



14
15
16
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 14

def initialize compound_matching
  @compound_matching = compound_matching
end

Instance Attribute Details

#compound_matchingObject

Returns the value of attribute compound_matching.



12
13
14
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 12

def compound_matching
  @compound_matching
end

Instance Method Details

#compileObject



18
19
20
21
22
# File 'lib/activefacts/cql/compiler/transform_rule.rb', line 18

def compile
  context = CompilationContext.new(@vocabulary)
  transform_matching = @compound_matching.compile(context)
  @constellation.TransformRule(:new, :compound_matching => transform_matching)
end