Class: OpenStax::Aws::Stack::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/openstax/aws/stack_event.rb

Instance Method Summary collapse

Constructor Details

#initialize(aws_stack_event) ⇒ Event

Returns a new instance of Event.



7
8
9
# File 'lib/openstax/aws/stack_event.rb', line 7

def initialize(aws_stack_event)
  @aws_stack_event = aws_stack_event
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/openstax/aws/stack_event.rb', line 19

def failed?
  Status.failure_status_texts.include?(status_text)
end

#status_reasonObject



15
16
17
# File 'lib/openstax/aws/stack_event.rb', line 15

def status_reason
  @aws_stack_event.data.resource_status_reason
end

#status_textObject



11
12
13
# File 'lib/openstax/aws/stack_event.rb', line 11

def status_text
  @aws_stack_event.data.resource_status
end

#user_initiated?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/openstax/aws/stack_event.rb', line 23

def user_initiated?
  status_reason == "User Initiated"
end