Class: MC2P::DetailOnlyResource
- Inherits:
-
Resource
- Object
- ResourceMixin
- Resource
- MC2P::DetailOnlyResource
- Defined in:
- lib/base.rb
Overview
Resource that allows send requests of detail
Direct Known Subclasses
Instance Method Summary collapse
-
#detail(resource_id) ⇒ Object
- Params:
resource_id
-
id to request Returns: an object item class with the response of the server.
- Params:
-
#initialize(api_request, path, object_item_class) ⇒ DetailOnlyResource
constructor
- Initializes a resource Params:
api_request
- Api request used to make all the requests to the API
path
- Path used to make all the requests to the API
object_item_class
-
Object item class used to return values.
- Path used to make all the requests to the API
- Api request used to make all the requests to the API
- Initializes a resource Params:
Methods inherited from ResourceMixin
Constructor Details
#initialize(api_request, path, object_item_class) ⇒ DetailOnlyResource
Initializes a resource Params:
api_request
-
Api request used to make all the requests to the API
path
-
Path used to make all the requests to the API
object_item_class
-
Object item class used to return values
240 241 242 243 244 245 |
# File 'lib/base.rb', line 240 def initialize(api_request, path, object_item_class) super(api_request, path, object_item_class) @do_resource_mixin = DetailOnlyResourceMixin.new(api_request, path, object_item_class, @paginator_class) end |
Instance Method Details
#detail(resource_id) ⇒ Object
Params:
resource_id
-
id to request
Returns: an object item class with the response of the server
250 251 252 |
# File 'lib/base.rb', line 250 def detail(resource_id) @do_resource_mixin.detail(resource_id) end |