Class: PostProxy::PaginatedResponse

Inherits:
ListResponse show all
Defined in:
lib/postproxy/types.rb

Instance Attribute Summary collapse

Attributes inherited from ListResponse

#data

Instance Method Summary collapse

Constructor Details

#initialize(data:, total:, page:, per_page:) ⇒ PaginatedResponse

Returns a new instance of PaginatedResponse.



245
246
247
248
249
250
# File 'lib/postproxy/types.rb', line 245

def initialize(data:, total:, page:, per_page:)
  super(data: data)
  @total = total
  @page = page
  @per_page = per_page
end

Instance Attribute Details

#pageObject (readonly)

Returns the value of attribute page.



243
244
245
# File 'lib/postproxy/types.rb', line 243

def page
  @page
end

#per_pageObject (readonly)

Returns the value of attribute per_page.



243
244
245
# File 'lib/postproxy/types.rb', line 243

def per_page
  @per_page
end

#totalObject (readonly)

Returns the value of attribute total.



243
244
245
# File 'lib/postproxy/types.rb', line 243

def total
  @total
end