class CfScript::Command::Routes::CheckRouteCommand

Public Class Methods

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

Public Instance Methods

run(host, domain) { |exists| ... } click to toggle source
# File lib/cf_script/command/cf/routes/check_route.rb, line 7
def run(host, domain, &block)
  run_cf self, host, domain do |output|
    return false unless good_run?(output)

    exists = output.matches?(/^Route #{host}.#{domain} does exist/)

    block_given? ? yield(exists) : exists
  end
end