Method: Parser::Source::TreeRewriter#replace
- Defined in:
- lib/parser/source/tree_rewriter.rb
#replace(range, content) ⇒ Rewriter
Replaces the code of the source range ‘range` with `content`.
193 194 195 |
# File 'lib/parser/source/tree_rewriter.rb', line 193 def replace(range, content) combine(range, replacement: content) end |