From e98c0aff1f66cf35ade28b689608c02950de5d5c Mon Sep 17 00:00:00 2001 From: Carlos Palhares Date: Fri, 29 Dec 2023 12:58:52 -0300 Subject: [PATCH] Adopt rubocop suggestions --- packages/ostruct-sanitizer/Gemfile.lock | 1 + packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ostruct-sanitizer/Gemfile.lock b/packages/ostruct-sanitizer/Gemfile.lock index 60ef19c5..916827d4 100644 --- a/packages/ostruct-sanitizer/Gemfile.lock +++ b/packages/ostruct-sanitizer/Gemfile.lock @@ -111,6 +111,7 @@ GEM rexml PLATFORMS + arm64-darwin-22 x86_64-linux DEPENDENCIES diff --git a/packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb b/packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb index 8957aba5..7d5226f3 100644 --- a/packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb +++ b/packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb @@ -62,7 +62,7 @@ def method_missing(method, *args) # @param [Any] value the attribute's value # def []=(name, value) - send("#{name}=", value) + send(:"#{name}=", value) end private @@ -72,7 +72,7 @@ def setter?(method) end def override_setter_for(field) - define_singleton_method("#{field}=") do |value| + define_singleton_method(:"#{field}=") do |value| @table[field] = sanitize(field, value) end end