Module: Roda::RodaPlugins::Kabk::RequestMethods

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

Instance Method Summary collapse

Instance Method Details

#kabkObject

The route block that mounts all Kabk endpoints



27
28
29
30
31
32
33
34
35
# File 'lib/roda/plugins/kabk.rb', line 27

def kabk
  options = scope.opts[:kabk]
  mount_at = options[:mount_at]

  # Use Roda routing methods to scope everything under mount_at
  on mount_at.sub(%r{^/}, "") do
    ::RodaPlugins::Kabk::RouteTree.call(self, options)
  end
end