module CfScript::Scope::App::Routes

Public Instance Methods

has_route?(domain, host = nil) click to toggle source
# File lib/cf_script/scope/app/routes.rb, line 3
def has_route?(domain, host = nil)
  route = [host, domain].compact.join('.')

  urls.include?(route)
end
map_route(domain, host = nil) click to toggle source
# File lib/cf_script/scope/app/routes.rb, line 9
def map_route(domain, host =  nil)
  CfScript::Command.map_route name, domain, host do |mapped|
    cf_self; has_route?(domain, host)
  end
end
unmap_route(domain, host = nil) click to toggle source
# File lib/cf_script/scope/app/routes.rb, line 15
def unmap_route(domain, host =  nil)
  CfScript::Command.unmap_route name, domain, host do |unmapped|
    cf_self; not has_route?(domain, host)
  end
end