fix rubocop warnings

This commit is contained in:
stve 2015-02-15 23:57:49 -05:00
parent 0a94dce118
commit b254d2fd90
3 changed files with 8 additions and 8 deletions

View file

@ -16,10 +16,10 @@ module Instapaper
# @param options [Hash] # @param options [Hash]
# @return [Instapaper::Client] # @return [Instapaper::Client]
def initialize(options = {}) def initialize(options = {})
options.each do |key, value| options.each do |key, value|
instance_variable_set("@#{key}", value) instance_variable_set("@#{key}", value)
end end
yield(self) if block_given? yield(self) if block_given?
end end
# @return [String] # @return [String]

View file

@ -44,7 +44,7 @@ module Instapaper
BOOKMARK_ERRORS, BOOKMARK_ERRORS,
FOLDER_ERRORS, FOLDER_ERRORS,
HIGHLIGHT_ERRORS, HIGHLIGHT_ERRORS,
].collect { |e| e.keys }.flatten ].collect(&:keys).flatten
# Create a new error from an HTTP response # Create a new error from an HTTP response
# #

View file

@ -49,9 +49,9 @@ module Instapaper
end end
def error(code) def error(code)
if Instapaper::Error::CODES.index(code.to_i) return unless Instapaper::Error::CODES.index(code.to_i)
Instapaper::Error.from_response(code, @path)
end Instapaper::Error.from_response(code, @path)
end end
def symbolize_keys!(object) def symbolize_keys!(object)