Sha256: 1a49e9d5b6c5800b25e2ca5d0035f903056364c5cdf8b4b3d57a37f2e174573f
Contents?: true
Size: 430 Bytes
Versions: 3
Compression:
Stored size: 430 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class VariableInterpolation < Cop def inspect(file, source, tokens, sexp) each(:string_dvar, sexp) do |s| var = s[1][1][1] lineno = s[1][1][2].lineno add_offence( :convention, lineno, "Replace interpolated var #{var} with expression \#{#{var}}." ) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.6.1 | lib/rubocop/cop/variable_interpolation.rb |
rubocop-0.6.0 | lib/rubocop/cop/variable_interpolation.rb |
rubocop-0.5.0 | lib/rubocop/cop/variable_interpolation.rb |