class StackMaster::StackEvents::Presenter

Public Class Methods

new(io) click to toggle source
# File lib/stack_master/stack_events/presenter.rb, line 8
def initialize(io)
  @io = io
end
print_event(io, event) click to toggle source

Public Instance Methods

event_colour(event) click to toggle source
# File lib/stack_master/stack_events/presenter.rb, line 16
def event_colour(event)
  if StackStates.failure_state?(event.resource_status)
    :red
  elsif StackStates.success_state?(event.resource_status)
    :green
  else
    :yellow
  end
end
print_event(event) click to toggle source