class Excursion::Pool::DSL
Public Class Methods
block_eval(app=nil, &block)
click to toggle source
# File lib/excursion/pool/dsl.rb, line 5 def self.block_eval(app=nil, &block) @application = app.is_a?(Excursion::Pool::Application) ? app : Excursion::Pool::Application.new('', {}) instance_eval &block if block_given? raise "You must assign a name to the application" if @application.name.blank? @application end
default_url_options(url_options)
click to toggle source
# File lib/excursion/pool/dsl.rb, line 17 def self.default_url_options(url_options) @application.default_url_options = url_options end
name(name_str)
click to toggle source
# File lib/excursion/pool/dsl.rb, line 13 def self.name(name_str) @application.name = name_str end
route(name, path)
click to toggle source
# File lib/excursion/pool/dsl.rb, line 25 def self.route(name, path) @application.add_route(name.to_sym, path) end
routes(route_hash)
click to toggle source
# File lib/excursion/pool/dsl.rb, line 21 def self.routes(route_hash) @application.routes = route_hash end