class Serenity::TextLine

Public Instance Methods

escape_text(text) click to toggle source
# File lib/serenity/serenity/line.rb, line 36
def escape_text text
  text.gsub(/['\\]/, '\\\\\&')
end
to_buf() click to toggle source
# File lib/serenity/serenity/line.rb, line 32
def to_buf
  " _buf << '" << escape_text(@text) << "';"
end