Method: Parser::Source::Rewriter#replace

Defined in:
lib/parser/source/rewriter.rb

#replace(range, content) ⇒ Rewriter

Deprecated.

Replaces the code of the source range range with content.

Parameters:

  • range (Range)
  • content (String)

Returns:

Raises:



167
168
169
# File 'lib/parser/source/rewriter.rb', line 167

def replace(range, content)
  append Rewriter::Action.new(range, content)
end