Skip to content

Commit

Permalink
use strings instead of symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
caitmich committed Jun 14, 2024
1 parent 4448e45 commit 385e1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/concerns/node_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ def self.included(base)
end

SERVICE_KEYS = %i[protocol port state product reason name version]
SERVICE_PROPERTIES = %i[services services_extras]
SERVICE_PROPERTIES = %w[services services_extras]

# -------------------------------------------- Individual property management
# Sets a property, storing value as Array when needed
# and taking care of duplications
def set_property(key, value)
if SERVICE_PROPERTIES.include?(key.to_sym) # let's get defensive
if SERVICE_PROPERTIES.include?(key.to_s) # let's get defensive
raise ArgumentError, 'don\'t use set_property for :services or '\
':services_extras, use set_service instead'
end
Expand Down

0 comments on commit 385e1a3

Please sign in to comment.