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_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
#compile ⇒ Object
125 126 127 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 125 def compile @parser.compile_import(@name, @alias_hash) end |
#to_s ⇒ Object
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 |