Method: Hanami::API.patch

Defined in:
lib/hanami/api.rb

.patch(*args, **kwargs, &blk) ⇒ Object

Defines a route that accepts PATCH requests for the given path.

Parameters:

  • path (String)

    the relative URL to be matched

  • to (#call)

    the Rack endpoint

  • as (Symbol)

    a unique name for the route

  • constraints (Hash)

    a set of constraints for path variables

  • blk (Proc)

    the anonymous proc to be used as endpoint for the route

See Also:

Since:

  • 0.1.0



125
126
127
# File 'lib/hanami/api.rb', line 125

def self.patch(*args, **kwargs, &blk)
  @routes << [:patch, args, kwargs, blk]
end