Class: ActiveFacts::CQL::Compiler::Import
- Inherits:
-
Definition
- Object
- Definition
- ActiveFacts::CQL::Compiler::Import
- Defined in:
- lib/activefacts/cql/compiler/shared.rb
Instance Attribute Summary
Attributes inherited from Definition
#constellation, #tree, #vocabulary
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(parser, name, alias_hash) ⇒ Import
constructor
A new instance of Import.
- #to_s ⇒ Object
Methods inherited from Definition
#all_bindings_in_clauses, #build_all_steps, #build_step, #build_variables, #source
Constructor Details
#initialize(parser, name, alias_hash) ⇒ Import
Returns a new instance of Import.
132 133 134 135 136 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 132 def initialize parser, name, alias_hash @parser = parser @name = name @alias_hash = alias_hash end |
Instance Method Details
#compile ⇒ Object
142 143 144 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 142 def compile @parser.compile_import(@name, @alias_hash) end |
#to_s ⇒ Object
138 139 140 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 138 def to_s "#{@vocabulary.to_s} imports #{@alias_hash.map{|k,v| "#{k} as #{v}" }*', '};" end |