class MC2P::ReadOnlyResource

Resource that allows send requests of list and detail

Public Class Methods

new(api_request, path, object_item_class) click to toggle source

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

Calls superclass method MC2P::DetailOnlyResource::new
# File lib/base.rb, line 262
def initialize(api_request, path, object_item_class)
  super(api_request, path, object_item_class)
  @ro_resource_mixin = ReadOnlyResourceMixin.new(api_request, path,
                                                 object_item_class,
                                                 @paginator_class)
end

Public Instance Methods

list(abs_url = nil) click to toggle source

Params:

abs_url

if is passed the request is sent to this url

Returns: a paginator class with the response of the server

# File lib/base.rb, line 272
def list(abs_url = nil)
  @ro_resource_mixin.list(abs_url)
end