grape

https://github.com/intridea/grape

Ruby

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

Grape::DSL::InsideRoute#entity_class_for_obj

Attempt to locate the Entity class for a given object, if not given
explicitly. This is done by looking for the presence of Klass::Entity,
where Klass is the class of the `object` parameter, or one of its
ancestors.

Source | Google | Stack overflow

Edit

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

cd grape

open lib/grape/dsl/inside_route.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Grape--DSL--InsideRoute-entity_class_for_obj-for-pr


# Commit to git

git add lib/grape/dsl/inside_route.rbgit commit -m "better docs for Grape::DSL::InsideRoute#entity_class_for_obj"


# 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--DSL--InsideRoute-entity_class_for_obj-for-pr

hub pull-request


# Celebrate!