Method: Thor::Actions#action

Defined in:
lib/thor/actions.rb

#action(instance) ⇒ Object

Wraps an action object and call it accordingly to the thor class behavior.

[View source]

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