Module: StackCommander::Command

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

Instance Method Summary collapse

Instance Method Details

#actionObject



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

def action
end

#call(stack) ⇒ Object



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

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

#cleanupObject



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

def cleanup
end

#insuranceObject



27
28
# File 'lib/stack_commander/command.rb', line 27

def insurance
end

#loggerObject



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

def logger
end

#recover(exception) ⇒ Object



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

def recover(exception)
end