grape
https://github.com/intridea/grape
Ruby
An opinionated framework for creating REST-like APIs in Ruby.
Grape::Validations::Types::VariantCollectionCoercer#initialize
Construct a new coercer that will attempt to coerce a list of values such that all members are of one of the given types. The container may also optionally be coerced to a +Set+. An arbitrary coercion +method+ may be supplied, which will be passed the entire collection as a parameter and should return a new collection, or may return the same one if no coercion was required.
Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/validations/types/variant_collection_coercer.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--Validations--Types--VariantCollectionCoercer-initialize-for-pr
# Commit to gitgit add lib/grape/validations/types/variant_collection_coercer.rbgit commit -m "better docs for Grape::Validations::Types::VariantCollectionCoercer#initialize"
# 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--VariantCollectionCoercer-initialize-for-pr
hub pull-request
# Celebrate!