Method: Parser::Source::TreeRewriter#insert_before

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

#insert_before(range, content) ⇒ Rewriter

Shortcut for ‘wrap(range, content, nil)`

Parameters:

  • range (Range)
  • content (String)

Returns:

Raises:



230
231
232
# File 'lib/parser/source/tree_rewriter.rb', line 230

def insert_before(range, content)
  wrap(range, content, nil)
end