Module: TapUnless
- Defined in:
- lib/tap_unless.rb
Instance Method Summary collapse
-
#tap_unless(*args) {|_self| ... } ⇒ Object
See TapIf.
Instance Method Details
#tap_unless(*args) {|_self| ... } ⇒ Object
See TapIf
5 6 7 8 9 |
# File 'lib/tap_unless.rb', line 5 def tap_unless(*args) yield self if ((args.empty? && !self) || (args.any? && respond_to?(args.first) && !send(*args))) # self end |