lib/usher/interface/rack_interface.rb in usher-0.5.3 vs lib/usher/interface/rack_interface.rb in usher-0.5.4
- old
+ new
@@ -23,9 +23,18 @@
def initialize(&blk)
@router = Usher.new(:request_methods => [:request_method, :host, :port, :scheme], :generator => Usher::Util::Generators::URL.new)
instance_eval(&blk) if blk
end
+ def dup
+ new_one = super
+ original = self
+ new_one.instance_eval do
+ @router = router.dup
+ end
+ new_one
+ end
+
def add(path, options = nil)
@router.add_route(path, options)
end
def parent_route=(route)