Construct a new Cursor object from a response hash
@param response [Hash] @param key [String, Symbol] The key to fetch the data from the response @param klass [Class] The class to instantiate objects in the response @param client [Twitter::REST::Client] @param request_method [String, Symbol] @param path [String] @param options [Hash] @return [Twitter::Cursor]
# File lib/twitter/cursor.rb, line 22 def from_response(response, key, klass, client, request_method, path, options) # rubocop:disable ParameterLists new(response[:body], key, klass, client, request_method, path, options) end
Initializes a new Cursor
@param attrs [Hash] @param key [String, Symbol] The key to fetch the data from the response @param klass [Class] The class to instantiate objects in the response @param client [Twitter::REST::Client] @param request_method [String, Symbol] @param path [String] @param options [Hash] @return [Twitter::Cursor]
# File lib/twitter/cursor.rb, line 37 def initialize(attrs, key, klass, client, request_method, path, options = {}) # rubocop:disable ParameterLists @key = key.to_sym @klass = klass @client = client @request_method = request_method.to_sym @path = path @options = options @collection = [] self.attrs = attrs end
Generated with the Darkfish Rdoc Generator 2.