Class: Runner
- Inherits:
-
Object
- Object
- Runner
- Defined in:
- lib/bvwack/runner.rb
Instance Method Summary collapse
-
#initialize(command, options, iteration_limit, to_clean_list, not_converted_list, to_convert_list) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(command, options, iteration_limit, to_clean_list, not_converted_list, to_convert_list) ⇒ Runner
Returns a new instance of Runner.
2 3 4 5 6 7 8 9 10 |
# File 'lib/bvwack/runner.rb', line 2 def initialize(command, , iteration_limit, to_clean_list, not_converted_list, to_convert_list) @command = command @options = @iteration_limit = iteration_limit @to_clean_list = to_clean_list @not_converted_list = not_converted_list @to_convert_list = to_convert_list end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bvwack/runner.rb', line 12 def run EchoBaseDirs.new(@options).echo_base_dirs (0..@iteration_limit).each do |i| case when @command == :dry_clean_up DryCleaner.new(@options, @to_clean_list, @not_converted_list).dry_clean_up when @command == :clean_up Cleaner.new(@options, @to_clean_list, @not_converted_list).clean_up when @command == :dry_wack file = @to_convert_list[i] DryWacker.new(file).dry_wack when @command == :wack file = @to_convert_list[i] Wacker.new(file).wack else end end end |