Class: Signpost::Route::Nested

Inherits:
Object
  • Object
show all
Defined in:
lib/signpost/route/nested.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#subpathObject (readonly)

Returns the value of attribute subpath.



4
5
6
# File 'lib/signpost/route/nested.rb', line 4

def subpath
  @subpath
end

Instance Method Details

#match(path, env) ⇒ Object



6
7
8
9
10
# File 'lib/signpost/route/nested.rb', line 6

def match(path, env)
  return unless path.start_with?(subpath)

  @router.call(env)
end