Class: RuboCop::Cop::PollEverywhere::Constantize

Inherits:
RuboCop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/polleverywhere/constantize.rb

Constant Summary collapse

MSG =
'The use of `constantize` is a potential security risk.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



13
14
15
16
17
# File 'lib/rubocop/cop/polleverywhere/constantize.rb', line 13

def on_send(node)
  return unless constantize?(node)

  add_offense(node, location: :selector)
end