class CfScript::Command::Routes::CreateRouteCommand

Public Class Methods

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

Public Instance Methods

run(space, domain, host = nil) { |exists| ... } click to toggle source
# File lib/cf_script/command/cf/routes/create_route.rb, line 7
def run(space, domain, host = nil, &block)
  options = host ? { n: host } : {}

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

    if exists = output.contains?(/^OK$/)
      block_given? ? yield(exists) : exists
    end
  end
end