Skip to content

Commit

Permalink
fix: avoid modifying args
Browse files Browse the repository at this point in the history
Co-authored-by: Kelly Joseph Price <[email protected]>
  • Loading branch information
Ilias Tsangaris and kellyjosephprice authored Jan 5, 2022
1 parent 2729d32 commit 5f906aa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/ruby/lib/readme/payload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ class Payload
def initialize(har, info, development:)
@har = har
# swap api_key for id
info[:id] = info.delete :api_key unless info[:api_key].nil?
# pull log_id and ignore fields out of info to construct a user_info hash that can be assigned to the group key
@log_id = info[:log_id]
@ignore = info[:ignore]
info.delete :log_id
info.delete :ignore
@user_info = info
@user_info = info.except(:api_key, :log_id, :ignore)
@user_info[:id] = info[:api_key] unless info[:api_key].nil?
@development = development
@uuid = UUID.new
end
Expand Down

0 comments on commit 5f906aa

Please sign in to comment.