class ActionView::Template::Handlers::ERB::Erubi

def add_text(text)

Experimental RBS support (using type sampling data from the type_fusion project).

def add_text: (String text) -> Integer

This signature was generated using 4 samples from 1 application.

def add_text(text)
  return if text.empty?
  if text == "\n"
    @newline_pending += 1
  else
    src << bufvar << ".safe_append='"
    src << "\n" * @newline_pending if @newline_pending > 0
    src << text.gsub(/['\\]/, '\\\\\&')
    src << "'.freeze;"
    @newline_pending = 0
  end
end