Class: Twitter::Cursor
- Inherits:
-
Object
- Object
- Twitter::Cursor
- Includes:
- Enumerable, Utils
- Defined in:
- lib/twitter/cursor.rb
Overview
Represents a cursor for paginating through Twitter API responses
Instance Attribute Summary collapse
-
#attrs ⇒ Hash
(also: #to_h)
readonly
The raw response attributes.
Instance Method Summary collapse
-
#initialize(key, klass, request, limit = nil) ⇒ Twitter::Cursor
constructor
Initializes a new Cursor.
Methods included from Utils
Methods included from Enumerable
Constructor Details
#initialize(key, klass, request, limit = nil) ⇒ Twitter::Cursor
Initializes a new Cursor
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/twitter/cursor.rb', line 45 def initialize(key, klass, request, limit = nil) @key = key @klass = klass @client = request.client @request_method = request.verb @path = request.path @options = request. @collection = [] @limit = limit self.attrs = request.perform end |
Instance Attribute Details
#attrs ⇒ Hash Also known as: to_h
The raw response attributes
17 18 19 |
# File 'lib/twitter/cursor.rb', line 17 def attrs @attrs end |