Class: RedditKit::PaginatedResponse
- Inherits:
-
Object
- Object
- RedditKit::PaginatedResponse
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/redditkit/paginated_response.rb
Overview
A response object for paginated requests, allowing users to access both results and pagination data.
Instance Attribute Summary collapse
-
#after ⇒ Object
readonly
Returns the value of attribute after.
-
#before ⇒ Object
readonly
Returns the value of attribute before.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(before, after, results) ⇒ PaginatedResponse
constructor
A new instance of PaginatedResponse.
Constructor Details
#initialize(before, after, results) ⇒ PaginatedResponse
Returns a new instance of PaginatedResponse.
15 16 17 18 19 |
# File 'lib/redditkit/paginated_response.rb', line 15 def initialize(before, after, results) @before = before @after = after @results = results end |
Instance Attribute Details
#after ⇒ Object (readonly)
Returns the value of attribute after.
13 14 15 |
# File 'lib/redditkit/paginated_response.rb', line 13 def after @after end |
#before ⇒ Object (readonly)
Returns the value of attribute before.
12 13 14 |
# File 'lib/redditkit/paginated_response.rb', line 12 def before @before end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
11 12 13 |
# File 'lib/redditkit/paginated_response.rb', line 11 def results @results end |