Skip to content

Commit 5f906aa

Browse files
Ilias Tsangariskellyjosephprice
andauthored
fix: avoid modifying args
Co-authored-by: Kelly Joseph Price <[email protected]>
1 parent 2729d32 commit 5f906aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/ruby/lib/readme/payload.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ class Payload
77
def initialize(har, info, development:)
88
@har = har
99
# swap api_key for id
10-
info[:id] = info.delete :api_key unless info[:api_key].nil?
1110
# pull log_id and ignore fields out of info to construct a user_info hash that can be assigned to the group key
1211
@log_id = info[:log_id]
1312
@ignore = info[:ignore]
14-
info.delete :log_id
15-
info.delete :ignore
16-
@user_info = info
13+
@user_info = info.except(:api_key, :log_id, :ignore)
14+
@user_info[:id] = info[:api_key] unless info[:api_key].nil?
1715
@development = development
1816
@uuid = UUID.new
1917
end

0 commit comments

Comments
 (0)