lib/mina/runner.rb in mina-1.0.0.beta1 vs lib/mina/runner.rb in mina-1.0.0.beta2
- old
+ new
@@ -1,8 +1,9 @@
module Mina
class Runner
attr_reader :commands, :backend
+ include Configuration::DSL
def initialize(commands, backend)
fail 'You must specify execution mode' if execution_mode.nil?
fail 'Unsuported execution mode (pretty on windows)' if unsuported_execution_mode?
@backend = backend
@@ -13,13 +14,13 @@
Mina::Runner.const_get(class_name_for(execution_mode)).new(script).run
end
def execution_mode
@execution_mode ||=
- if Mina::Configuration.instance.fetch(:simulate)
+ if fetch(:simulate)
:printer
else
- Mina::Configuration.instance.fetch(:execution_mode)
+ fetch(:execution_mode)
end
end
private