Module: StackCommander::Command

Included in:
BaseCommand
Defined in:
lib/stack_commander/command.rb

Instance Method Summary collapse

Instance Method Details

#actionObject



17
18
# File 'lib/stack_commander/command.rb', line 17

def action
end

#call(stack) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/stack_commander/command.rb', line 3

def call(stack)
  action
  stack.call
  cleanup
rescue => exception
  recover(exception)
  raise
ensure
  insurance
end

#cleanupObject



14
15
# File 'lib/stack_commander/command.rb', line 14

def cleanup
end

#insuranceObject



23
24
# File 'lib/stack_commander/command.rb', line 23

def insurance
end

#recover(exception) ⇒ Object



20
21
# File 'lib/stack_commander/command.rb', line 20

def recover(exception)
end