Module: Roda::RodaPlugins::EmptyRoot::RequestMethods

Defined in:
lib/roda/plugins/empty_root.rb

Instance Method Summary collapse

Instance Method Details

#root(&block) ⇒ Object

Match when the remaining path is the empty string, in addition to the default behavior of matching when the remaining path is /.



40
41
42
43
44
45
# File 'lib/roda/plugins/empty_root.rb', line 40

def root(&block)
  super
  if remaining_path == EMPTY_STRING && is_get?
    always(&block)
  end
end