Class: Rack::Mount::RouteSet

Inherits:
Object
  • Object
show all
Includes:
Generation::RouteSet, Rack::Mount::Recognition::RouteSet, Base
Defined in:
lib/rack/mount/route_set.rb,
lib/rack/mount/mappers/merb.rb,
lib/rack/mount/mappers/simple.rb,
lib/rack/mount/mappers/rails_draft.rb

Defined Under Namespace

Modules: Base

Constant Summary

Constants included from Generation::RouteSet

Generation::RouteSet::DEFAULT_KEYS

Constants included from Rack::Mount::Recognition::RouteSet

Rack::Mount::Recognition::RouteSet::DEFAULT_CATCH_STATUS, Rack::Mount::Recognition::RouteSet::DEFAULT_KEYS

Instance Method Summary collapse

Methods included from Generation::RouteSet

#add_route, #freeze, #initialize, #url_for

Methods included from Rack::Mount::Recognition::RouteSet

#add_route, #call, #freeze, #height, #initialize

Methods included from Base

#add_route, #initialize

Instance Method Details

#new_draw(&block) ⇒ Object



6
7
8
9
10
11
# File 'lib/rack/mount/mappers/rails_draft.rb', line 6

def new_draw(&block)
  mapper = Mappers::RailsDraft.new(self)
  mapper.instance_eval(&block)
  add_route(Mappers::RailsDraft::NotFound, :path => /.*/)
  freeze
end

#prepare {|map| ... } ⇒ Object

Yields:

  • (map)


8
9
10
11
# File 'lib/rack/mount/mappers/merb.rb', line 8

def prepare(*args, &block)
  Mappers::Merb.new(self).prepare(*args, &block)
  freeze
end