Class: Stackup::Monitor

Inherits:
Object
  • Object
show all
Defined in:
lib/stackup/monitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stack) ⇒ Monitor



5
6
7
8
# File 'lib/stackup/monitor.rb', line 5

def initialize(stack)
  @stack = stack
  @events = Set.new
end

Instance Attribute Details

#eventsObject

Returns the value of attribute events.



4
5
6
# File 'lib/stackup/monitor.rb', line 4

def events
  @events
end

#stackObject

Returns the value of attribute stack.



4
5
6
# File 'lib/stackup/monitor.rb', line 4

def stack
  @stack
end

Instance Method Details

#new_eventsObject



10
11
12
13
14
15
16
# File 'lib/stackup/monitor.rb', line 10

def new_events
  stack.events.take_while do |event|
    !seen?(event)
  end.reverse
rescue ::Aws::CloudFormation::Errors::ValidationError => e
  []
end