Module: Spine::Routing::Syntax::Namespacing

Included in:
Router
Defined in:
lib/spine/routing/syntax/namespacing.rb

Instance Method Summary collapse

Instance Method Details

#scope(path, &block) ⇒ Object



5
6
7
8
9
# File 'lib/spine/routing/syntax/namespacing.rb', line 5

def scope(path, &block)
  nested = NestedRouter.new(normalize_path(path.to_s), self)
  nested.instance_eval &block
  self
end