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, import_role, version_pattern, 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, import_role, version_pattern, alias_hash) ⇒ Import
Returns a new instance of Import.
134 135 136 137 138 139 140 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 134 def initialize parser, name, import_role, version_pattern, alias_hash @parser = parser @name = name @import_role = import_role @version_pattern = version_pattern @alias_hash = alias_hash end |
Instance Method Details
#compile ⇒ Object
146 147 148 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 146 def compile @parser.compile_import(@name, @import_role, @alias_hash) end |
#to_s ⇒ Object
142 143 144 |
# File 'lib/activefacts/cql/compiler/shared.rb', line 142 def to_s "#{@vocabulary.to_s} imports #{@alias_hash.map{|k,v| "#{k} as #{v}" }*', '};" end |