Method: RuboCop::Cop::Style::VariableInterpolation#on_node_with_interpolations
- Defined in:
- lib/rubocop/cop/style/variable_interpolation.rb
permalink #on_node_with_interpolations(node) ⇒ Object
[View source]
24 25 26 27 28 29 30 |
# File 'lib/rubocop/cop/style/variable_interpolation.rb', line 24 def on_node_with_interpolations(node) var_nodes(node.children).each do |var_node| add_offense(var_node) do |corrector| corrector.replace(var_node, "{#{var_node.source}}") end end end |