class Lono::Sets::Status::Instance::Completed

Public Instance Methods

completed?(status) click to toggle source

status: one of CURRENT, OUTDATED, INOPERABLE

# 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() click to toggle source
# 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!() click to toggle source
# 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() click to toggle source
# File lib/lono/sets/status/instance/completed.rb, line 4
def tail
  display_one
  Thread.new do
    loop!
  end
end