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.



124
125
126
127
128
129
# File 'lib/postproxy/types.rb', line 124

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.



122
123
124
# File 'lib/postproxy/types.rb', line 122

def page
  @page
end

#per_pageObject (readonly)

Returns the value of attribute per_page.



122
123
124
# File 'lib/postproxy/types.rb', line 122

def per_page
  @per_page
end

#totalObject (readonly)

Returns the value of attribute total.



122
123
124
# File 'lib/postproxy/types.rb', line 122

def total
  @total
end