To match on string interpolation:
module MyCops
class MyGreatCop < Cop
include Interpolation # <- required when attempting to match on_interpolation
def on_interpolation(node)
# Using node.parent gets you the String rather than the interpolation
if /foo/.match(begin_node.parent.source)