mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-03-25 08:55:49 +00:00
fix rubocop warnings
This commit is contained in:
parent
0a94dce118
commit
b254d2fd90
3 changed files with 8 additions and 8 deletions
|
|
@ -16,10 +16,10 @@ module Instapaper
|
|||
# @param options [Hash]
|
||||
# @return [Instapaper::Client]
|
||||
def initialize(options = {})
|
||||
options.each do |key, value|
|
||||
instance_variable_set("@#{key}", value)
|
||||
end
|
||||
yield(self) if block_given?
|
||||
options.each do |key, value|
|
||||
instance_variable_set("@#{key}", value)
|
||||
end
|
||||
yield(self) if block_given?
|
||||
end
|
||||
|
||||
# @return [String]
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ module Instapaper
|
|||
BOOKMARK_ERRORS,
|
||||
FOLDER_ERRORS,
|
||||
HIGHLIGHT_ERRORS,
|
||||
].collect { |e| e.keys }.flatten
|
||||
].collect(&:keys).flatten
|
||||
|
||||
# Create a new error from an HTTP response
|
||||
#
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ module Instapaper
|
|||
end
|
||||
|
||||
def error(code)
|
||||
if Instapaper::Error::CODES.index(code.to_i)
|
||||
Instapaper::Error.from_response(code, @path)
|
||||
end
|
||||
return unless Instapaper::Error::CODES.index(code.to_i)
|
||||
|
||||
Instapaper::Error.from_response(code, @path)
|
||||
end
|
||||
|
||||
def symbolize_keys!(object)
|
||||
|
|
|
|||
Loading…
Reference in a new issue