module Roda::RodaPlugins::ModuleInclude

  1. lib/roda/plugins/module_include.rb

The module_include plugin adds request_module and response_module class methods for adding modules/methods to request/response classes. It's designed to make it easier to add request/response methods for a given roda class. To add a module to the request or response class:

Roda.request_module SomeRequestModule
Roda.response_module SomeResponseModule

Alternatively, you can pass a block to the methods and it will create a module automatically:

Roda.request_module do
  def description
    "#{request_method} #{path_info}"