Class: Usher::Interface::RackInterface::Builder

Inherits:
Rack::Builder
  • Object
show all
Defined in:
lib/usher/interface/rack_interface.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Builder

Returns a new instance of Builder.



11
12
13
14
# File 'lib/usher/interface/rack_interface.rb', line 11

def initialize(&block)
  @usher = Usher::Interface::RackInterface.new
  super
end

Instance Method Details

#map(path, options = nil, &block) ⇒ Object



16
17
18
19
# File 'lib/usher/interface/rack_interface.rb', line 16

def map(path, options = nil, &block)
  @usher.add(path, options).to(&block)
  @ins << @usher unless @ins.last == @usher
end