Class: Twitter::Cursor

Inherits:
Object
  • Object
show all
Includes:
Enumerable, Utils
Defined in:
lib/twitter/cursor.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Utils

flat_pmap, pmap

Methods included from Enumerable

#each

Constructor Details

- (Twitter::Cursor) initialize(attrs, key, klass, request)

Initializes a new Cursor

Parameters:

  • attrs (Hash)
  • key (String, Symbol)

    The key to fetch the data from the response

  • klass (Class)

    The class to instantiate objects in the response

  • request (Twitter::Request)


20
21
22
23
24
25
26
27
28
29
# File 'lib/twitter/cursor.rb', line 20

def initialize(attrs, key, klass, request)
  @key = key.to_sym
  @klass = klass
  @client = request.client
  @request_method = request.verb
  @path = request.path
  @options = request.options
  @collection = []
  self.attrs = attrs
end

Instance Attribute Details

- (Object) attrs Also known as: to_h

Returns the value of attribute attrs



8
9
10
# File 'lib/twitter/cursor.rb', line 8

def attrs
  @attrs
end