class CfScript::Command::Apps::StopCommand

Public Class Methods

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

Public Instance Methods

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

    if output.ok?
      block_given? ? yield(true) : true
    else
      error "failed to stop app"
      return false
    end
  end
end