class CfScript::Command::Routes::DeleteRouteCommand

Public Class Methods

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

Public Instance Methods

run(domain, host = nil, force = true) { |deleted| ... } click to toggle source
# File lib/cf_script/command/cf/routes/delete_route.rb, line 7
def run(domain, host = nil, force = true, &block)
  options = {}

  options[:n] = host if host
  options[:flags] = [:f] if force

  run_cf self, domain, options do |output|
    return false unless good_run?(output)

    if deleted = output.ok?
      block_given? ? yield(deleted) : deleted
    end
  end
end