Class: ETL::Batch::Context
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
Class Method Summary collapse
-
.create(batch) ⇒ Object
Create a context that is used when evaluating the batch file.
Instance Method Summary collapse
- #file ⇒ Object
- #get_binding ⇒ Object
-
#initialize(batch) ⇒ Context
constructor
A new instance of Context.
- #run(file) ⇒ Object
- #use_temp_tables(value = true) ⇒ Object
Constructor Details
#initialize(batch) ⇒ Context
Returns a new instance of Context.
13 14 15 |
# File 'lib/etl/batch/batch.rb', line 13 def initialize(batch) @batch = batch end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
4 5 6 |
# File 'lib/etl/batch/batch.rb', line 4 def batch @batch end |
Class Method Details
.create(batch) ⇒ Object
Create a context that is used when evaluating the batch file
8 9 10 |
# File 'lib/etl/batch/batch.rb', line 8 def create(batch) Context.new(batch).get_binding end |
Instance Method Details
#file ⇒ Object
17 18 19 |
# File 'lib/etl/batch/batch.rb', line 17 def file batch.file end |
#get_binding ⇒ Object
21 22 23 |
# File 'lib/etl/batch/batch.rb', line 21 def get_binding binding end |
#run(file) ⇒ Object
25 26 27 |
# File 'lib/etl/batch/batch.rb', line 25 def run(file) batch.run(File.dirname(self.file) + "/" + file) end |
#use_temp_tables(value = true) ⇒ Object
29 30 31 |
# File 'lib/etl/batch/batch.rb', line 29 def use_temp_tables(value=true) batch.use_temp_tables(value) end |