Parent

Methods

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Lint::EmptyInterpolation

This cop checks for empty interpolation.

@example

"result is #{}"

Constants

MSG

Public Instance Methods

on_dstr(node) click to toggle source
# File lib/rubocop/cop/lint/empty_interpolation.rb, line 13
def on_dstr(node)
  node.children.select { |n| n.type == :begin }.each do |begin_node|
    add_offense(begin_node, :expression) if begin_node.children.empty?
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.