Module: RuboCop::Cop::Interpolation Abstract
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/rubocop/cop/mixin/interpolation.rb |
Overview
This module is abstract.
Subclasses are expected to implement #on_interpolation.
Common functionality for working with string interpolations.
Instance Method Summary
- #on_dstr(node) (also: #on_xstr, #on_dsym, #on_regexp)
-
#on_dsym(node)
Alias for #on_dstr.
-
#on_interpolation(begin_node)
Inspect the
:begin
node of an interpolation. - #on_node_with_interpolations(node)
-
#on_regexp(node)
Alias for #on_dstr.
-
#on_xstr(node)
Alias for #on_dstr.
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.
# 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
#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.
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 15
alias on_regexp on_dstr
#on_xstr(node)
Alias for #on_dstr.
# File 'lib/rubocop/cop/mixin/interpolation.rb', line 13
alias on_xstr on_dstr