123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::Cop::Interpolation Abstract

Overview

This module is abstract.

Subclasses are expected to implement #on_interpolation.

Common functionality for working with string interpolations.

Instance Method Summary

Instance Method Details

#on_dstr(node) Also known as: #on_xstr, #on_dsym, #on_regexp

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 9

def on_dstr(node)
  on_node_with_interpolations(node)
end

#on_dsym(node)

Alias for #on_dstr.

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 14

alias on_dsym on_dstr

#on_interpolation(begin_node)

Inspect the :begin node of an interpolation

[ GitHub ]

#on_node_with_interpolations(node)

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 17

def on_node_with_interpolations(node)
  node.each_child_node(:begin) { |begin_node| on_interpolation(begin_node) }
end

#on_regexp(node)

Alias for #on_dstr.

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 15

alias on_regexp on_dstr

#on_xstr(node)

Alias for #on_dstr.

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 13

alias on_xstr on_dstr