grape

https://github.com/intridea/grape

Ruby

An opinionated framework for creating REST-like APIs in Ruby.

Grape::Validations::ParamsScope#infer_coercion

Validate and comprehend the +:type+, +:types+, and +:coerce_with+
options that have been supplied to the parameter declaration.
The +:type+ and +:types+ options will be removed from the
validations list, replaced appropriately with +:coerce+ and
+:coerce_with+ options that will later be passed to
{Validators::CoerceValidator}. The type that is returned may be
used for documentation and further validation of parameter
options.

Source | Google | Stack overflow

Edit

git clone [email protected]:intridea/grape.git

cd grape

open lib/grape/validations/params_scope.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Grape--Validations--ParamsScope-infer_coercion-for-pr


# Commit to git

git add lib/grape/validations/params_scope.rbgit commit -m "better docs for Grape::Validations::ParamsScope#infer_coercion"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Grape--Validations--ParamsScope-infer_coercion-for-pr

hub pull-request


# Celebrate!