grape
https://github.com/intridea/grape
Ruby
An opinionated framework for creating REST-like APIs in Ruby.
Grape::Validations::Types.build_coercer
Work out the +Virtus::Attribute+ object to
use for coercing strings to the given +type+.
Coercion +method+ will be inferred if none is
supplied.
If a +Virtus::Attribute+ object already built
with +Virtus::Attribute.build+ is supplied as
the +type+ it will be returned and +method+
will be ignored.
See {CustomTypeCoercer} for further details
about coercion and type-checking inference.Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/validations/types.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--Validations--Types-build_coercer-for-pr
# Commit to gitgit add lib/grape/validations/types.rbgit commit -m "better docs for Grape::Validations::Types.build_coercer"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Grape--Validations--Types-build_coercer-for-pr
hub pull-request
# Celebrate!