diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dsl.rb | 4 | ||||
| -rw-r--r-- | lib/dslkeywords/only_when.rb | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -8,7 +8,7 @@ Dir["#{Dir.pwd}/lib/dslkeywords/*.rb"].each { |m| require m } module RCM # Here all starts class DSL - attr_reader :id + attr_reader :id, :conds_met def self.reset! @@rcm_counter = -1 @@ -43,6 +43,6 @@ def configure(reset: false, &block) RCM::DSL.new(reset) do |rcm| rcm.info('Configuring...') rcm.instance_eval(&block) - rcm.evaluate! + rcm.evaluate! if rcm.conds_met end end diff --git a/lib/dslkeywords/only_when.rb b/lib/dslkeywords/only_when.rb index 82dbc1f..485fd42 100644 --- a/lib/dslkeywords/only_when.rb +++ b/lib/dslkeywords/only_when.rb @@ -5,7 +5,7 @@ module RCM def initialize = @conds = {} def is(arg) = arg - def method_missing(method_name, *args, &block) = @conds[method_name] = args.first + def method_missing(method_name, *args) = @conds[method_name] = args.first def respond_to_missing? = true def met? |
