lib/active_warnings.rb in active_warnings-0.1.1 vs lib/active_warnings.rb in active_warnings-0.1.2

- old
+ new

@@ -51,20 +51,20 @@ !safe?(context) end alias_method :has_warnings?, :unsafe? def safe?(context=nil) - with_warnings { valid?(context) } + using_warnings { valid?(context) } end alias_method :no_warnings?, :safe? - def with_warnings + def using_warnings @run_warning_validations = true yield ensure @run_warning_validations = nil end - def with_warnings? + def using_warnings? !!@run_warning_validations end end