Method: Thor::Actions#action
- Defined in:
- lib/thor/actions.rb
permalink #action(instance) ⇒ Object
Wraps an action object and call it accordingly to the thor class behavior.
89 90 91 92 93 94 95 |
# File 'lib/thor/actions.rb', line 89 def action(instance) #:nodoc: if behavior == :revoke instance.revoke! else instance.invoke! end end |