class CfScript::Command::Apps::RestartCommand

Public Class Methods

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

Public Instance Methods

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

    if app = build_app_info(app_name, output)
      block_given? ? yield(app) : app
    else
      error "app is nil"
    end
  end
end