Class: RuboCop::Cop::Paraxial::Raw

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/paraxial/raw.rb

Constant Summary collapse

MSG =
'`raw` leads to XSS when called on user input.'

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



7
8
9
10
11
12
# File 'lib/rubocop/cop/paraxial/raw.rb', line 7

def on_send(node)
  method_name = node.method_name
  return unless send_methods.include?(method_name)

  add_offense(node, message: format(MSG, method: method_name))
end