module Excursion::Builders::ApplicationBuilder

Public Instance Methods

excursion(app_name) click to toggle source

Returns an Excursion::Builders::UrlBuilder if the app exists in the route pool.

Raises an exception if the requested app is not in the route pool.

# File lib/excursion/builders/application_builder.rb, line 8
def excursion(app_name)
  raise NotInPool, "Application is not registered in the excursion route pool: '#{app_name}'" unless app_exists?(app_name)
  
  return Builders.builder(app_name) unless Builders.builder(app_name).nil?
  Builders.register_builder(UrlBuilder.new(app_name))
end
method_missing(meth, *args) click to toggle source
Calls superclass method
# File lib/excursion/builders/application_builder.rb, line 15
def method_missing(meth, *args)
  excursion(meth.to_s)
rescue
  super
end
respond_to_missing?(meth, include_private=false) click to toggle source
Calls superclass method
# File lib/excursion/builders/application_builder.rb, line 21
def respond_to_missing?(meth, include_private=false)
  app_exists?(meth.to_s) || super
end

Protected Instance Methods

app_exists?(app_name) click to toggle source
# File lib/excursion/builders/application_builder.rb, line 27
def app_exists?(app_name)
  !excursion_app(app_name).nil?
end
excursion_app(app_name) click to toggle source
# File lib/excursion/builders/application_builder.rb, line 31
def excursion_app(app_name)
  Pool.application(app_name)
end