Module: Hanami::API::DSL::ClassMethods::Routes Private

Defined in:
lib/hanami/api/dsl.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0

Instance Method Summary collapse

Instance Method Details

#routes(&blk) ⇒ Object

A block to define application routes

This is ONLY available for third-party frameworks that use Hanami::API DSL.

If you use Hanami::API directly, this method isn’t available.

Parameters:

  • blk (Proc)

    the block to define the routes

See Also:

Since:

  • 0.2.0



83
84
85
# File 'lib/hanami/api/dsl.rb', line 83

def routes(&blk)
  router.instance_eval(&blk)
end