Method: FancyCommand::Command#if_success_then
- Defined in:
- lib/fancy_command/command.rb
#if_success_then(&blk) ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/fancy_command/command.rb', line 109 def if_success_then(&blk) if success? if blk.arity == 1 blk.call(self) else blk.call end end self end |