Skip to content

Commit

Permalink
Merge pull request #59 from raszi/fix-rubocop
Browse files Browse the repository at this point in the history
refactor: use Hash#transform_values instead of Hash#map { }.to_h
  • Loading branch information
raszi authored Jul 8, 2020
2 parents 0b15c96 + 1ca4be7 commit e23b3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mrkt/faraday/params_encoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Faraday
class ParamsEncoder
class << self
def encode(hash)
new_hash = hash.map { |k, v| [k, encode_value(v)] }.to_h
new_hash = hash.transform_values { |v| encode_value(v) }
::Faraday::NestedParamsEncoder.encode(new_hash)
end

Expand Down

0 comments on commit e23b3de

Please sign in to comment.