Class: ActiveFacts::CQL::Compiler::Import

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

Instance Attribute Summary

Attributes inherited from Definition

#constellation, #tree, #vocabulary

Instance Method Summary collapse

Methods inherited from Definition

#all_bindings_in_clauses, #build_all_steps, #build_steps, #build_variables, #source

Constructor Details

#initialize(parser, name, alias_hash) ⇒ Import

Returns a new instance of Import.



115
116
117
118
119
# File 'lib/activefacts/cql/compiler/shared.rb', line 115

def initialize parser, name, alias_hash
  @parser = parser
  @name = name
  @alias_hash = alias_hash
end

Instance Method Details

#compileObject



125
126
127
# File 'lib/activefacts/cql/compiler/shared.rb', line 125

def compile
  @parser.compile_import(@name, @alias_hash)
end

#to_sObject



121
122
123
# File 'lib/activefacts/cql/compiler/shared.rb', line 121

def to_s
  "#{@vocabulary.to_s} imports #{@alias_hash.map{|k,v| "#{k} as #{v}" }*', '};"
end