Class: Albacore::Tools::FluentMigrator::MigrateCmdFactory
- Inherits:
-
Object
- Object
- Albacore::Tools::FluentMigrator::MigrateCmdFactory
- Defined in:
- lib/albacore/tools/fluent_migrator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MigrateCmdFactory
constructor
A new instance of MigrateCmdFactory.
Constructor Details
#initialize ⇒ MigrateCmdFactory
Returns a new instance of MigrateCmdFactory.
177 178 179 |
# File 'lib/albacore/tools/fluent_migrator.rb', line 177 def initialize raise "don't create this class" end |
Class Method Details
.create(*args) ⇒ Object
180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/albacore/tools/fluent_migrator.rb', line 180 def self.create *args ::Albacore.application.logger.debug "in create" opts = Map. args opts.apply :file => ENV['FILE'] return ::Albacore::Tools::FluentMigrator::Cmd.new(*args) unless opts.get( :file ) ::Albacore.application.logger.debug "Found FILE environment var: #{opts.get :file}" args = args.push(:file => opts.get(:file)) return ::Albacore::Tools::FluentMigrator::BatchMigrateTask.new(*args) end |