lib/twitter/cursor.rb in twitter-5.4.1 vs lib/twitter/cursor.rb in twitter-5.5.0
- old
+ new
@@ -40,11 +40,11 @@
@client = client
@request_method = request_method.to_sym
@path = path
@options = options
@collection = []
- set_attrs(attrs)
+ self.attrs = attrs
end
private
def next_cursor
@@ -57,13 +57,13 @@
next_cursor.zero?
end
def fetch_next_page
response = @client.send(@request_method, @path, @options.merge(:cursor => next_cursor))
- set_attrs(response[:body])
+ self.attrs = response[:body]
end
- def set_attrs(attrs)
+ def attrs=(attrs)
@attrs = attrs
Array(attrs[@key]).each do |element|
@collection << (@klass ? @klass.new(element) : element)
end
end