Class: Lono::Sets::Status::Instance::Completed
- Defined in:
- lib/lono/sets/status/instance/completed.rb
Instance Method Summary collapse
-
#completed?(status) ⇒ Boolean
status: one of CURRENT, OUTDATED, INOPERABLE.
- #display_one ⇒ Object
- #loop! ⇒ Object
- #tail ⇒ Object
Methods inherited from Base
#delay, #describe_stack_instance, #initialize, #say, #show_instance, #show_time_progress, #status_line
Methods included from AwsServices
#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts
Methods included from AwsServices::Helper
#rollback_complete?, #testing_update?
Methods included from AwsServices::StackSet
#find_stack_set, #stack_set_exists?
Methods included from AwsServices::Stack
Constructor Details
This class inherits a constructor from Lono::Sets::Status::Instance::Base
Instance Method Details
#completed?(status) ⇒ Boolean
status: one of CURRENT, OUTDATED, INOPERABLE
30 31 32 33 |
# File 'lib/lono/sets/status/instance/completed.rb', line 30 def completed?(status) completed_statuses = %w[CURRENT INOPERABLE] completed_statuses.include?(status) end |
#display_one ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/lono/sets/status/instance/completed.rb', line 21 def display_one resp = describe_stack_instance stack_instance = resp.stack_instance show_instance(stack_instance) @shown << stack_instance resp end |
#loop! ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/lono/sets/status/instance/completed.rb', line 11 def loop! # resp.stack_instance.status : one of CURRENT, OUTDATED, INOPERABLE status = nil until completed?(status) resp = display_one status = resp.stack_instance.status delay unless completed?(status) end end |
#tail ⇒ Object
4 5 6 7 8 9 |
# File 'lib/lono/sets/status/instance/completed.rb', line 4 def tail display_one Thread.new do loop! end end |