lib/tram/policy/validator.rb in tram-policy-0.2.5 vs lib/tram/policy/validator.rb in tram-policy-0.3.0

- old
+ new

@@ -13,10 +13,10 @@ private def initialize(name, block, stop_on_failure: false) @name = name&.to_sym - @block = block + @block = lambda(&block) if block raise "Provide either method name or a block" unless !name ^ !block @stop_on_failure = stop_on_failure end end end