Skip to content

Commit

Permalink
Coding style: fix Lint/SymbolConversion offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Oct 17, 2024
1 parent 5c61dc7 commit 2d244b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netbox_client_ruby/entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def update(new_values)
s_attribute = attribute.to_s
next if readonly_fields.include? s_attribute

sym_attr_writer = "#{attribute}=".to_sym
sym_attr_writer = :"#{attribute}="
if methods.include?(sym_attr_writer)
public_send(sym_attr_writer, values)
else
Expand Down Expand Up @@ -197,7 +197,7 @@ def method_missing(name_as_symbol, *args, &block)

if name.end_with?('=')
is_readonly_field = readonly_fields.include?(name[0..-2])
is_instance_variable = instance_variables.include?("@#{name[0..-2]}".to_sym)
is_instance_variable = instance_variables.include?(:"@#{name[0..-2]}")
not_this_classes_business = is_readonly_field || is_instance_variable

return super if not_this_classes_business
Expand Down

0 comments on commit 2d244b2

Please sign in to comment.