Parent

Methods

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Style::VariableInterpolation

This cop checks for variable interpolation (like "#@ivar").

Constants

MSG

Public Instance Methods

on_dstr(node) click to toggle source
# File lib/rubocop/cop/style/variable_interpolation.rb, line 9
def on_dstr(node)
  var_nodes(node.children).each do |v|
    var = v.loc.expression.source

    add_offense(v, :expression, format(MSG, var, var))
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.