class CfScript::Command::Apps::RestartAppInstanceCommand

Public Class Methods

new() click to toggle source
Calls superclass method CfScript::Command::Base::new
# File lib/cf_script/command/cf/apps/restart_app_instance.rb, line 3
def initialize
  super(:apps, :restart_app_instance)
end

Public Instance Methods

run(app_name, instance_index) { |true| ... } click to toggle source
# File lib/cf_script/command/cf/apps/restart_app_instance.rb, line 7
def run(app_name, instance_index, &block)
  run_cf self, app_name, instance_index do |output|
    return false unless good_run?(output, check_failed: false)

    if output.ok?
      block_given? ? yield(true) : true
    else
      error "failed to restart app instance #{instance_index}"
      return false
    end
  end
end