Module: FulfilApi::Resource::Relation::Naming
- Extended by:
- ActiveSupport::Concern
- Included in:
- FulfilApi::Resource::Relation
- Defined in:
- lib/fulfil_api/resource/relation/naming.rb
Overview
The Naming extends the relation by
adding methods to it that allow us to identify the type of resource that
is being requested.
Instance Method Summary collapse
-
#set(name:) ⇒ FulfilApi::Resource::Relation
Sets the name of the resource model to be queried.
Instance Method Details
#set(name:) ⇒ FulfilApi::Resource::Relation
TODO:
In the future, derive the FulfilApi::Resource::Relation#name from the @resource_klass automatically.
Sets the name of the resource model to be queried.
24 25 26 27 28 |
# File 'lib/fulfil_api/resource/relation/naming.rb', line 24 def set(name:) clone.tap do |relation| relation.name = name end end |