Flowdock
method

add_text

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: Erubi
add_text(text) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/template/handlers/erb/erubi.rb, line 30
          def add_text(text)
            return if text.empty?

            if text == "\n"
              @newline_pending += 1
            else
              src << "@output_buffer.safe_append='"
              src << "\n" * @newline_pending if @newline_pending > 0
              src << text.gsub(/['\\]/, '\\\&')
              src << "'.freeze;"

              @newline_pending = 0
            end
          end
Register or log in to add new notes.