class Stackit::ThorNotifier

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/stackit/stack/default_notifier.rb, line 9
def initialize(*args)
  super(*args)
end

Public Instance Methods

backtrace(e) click to toggle source
# File lib/stackit/stack/default_notifier.rb, line 15
def backtrace(e)
  puts
  puts e.backtrace
end
error(message) click to toggle source
# File lib/stackit/stack/default_notifier.rb, line 20
def error(message)
  say_status 'ERROR', message, :red
end
response(response, message = 'Success', respond_to_key = 'stack_id') click to toggle source
# File lib/stackit/stack/default_notifier.rb, line 28
def response(response, message = 'Success', respond_to_key = 'stack_id')
  if response.is_a?(::Seahorse::Client::Response) || response.is_a?(Stackit::ManagedStack::DRY_RUN_RESPONSE)
    if response.respond_to?(respond_to_key)
      success(response.send(respond_to_key))
    else
      success(message)
    end
  else
    error(response)
  end
end
success(message) click to toggle source
# File lib/stackit/stack/default_notifier.rb, line 24
def success(message)
  say_status 'OK', message
end