Class: Serenity::CodeLine
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Line
Instance Method Summary collapse
Methods inherited from Line
#clone, code, #initialize, literal, string, text, #to_s
Constructor Details
This class inherits a constructor from Serenity::Line
Instance Method Details
#escape_code(code) ⇒ Object
60 61 62 |
# File 'lib/serenity/line.rb', line 60 def escape_code code code.mgsub! [[/'/, "'"], [/>/, '>'], [/</, '<'], [/"/, '"'], [/&/, '&']] end |
#to_buf ⇒ Object
56 57 58 |
# File 'lib/serenity/line.rb', line 56 def to_buf escape_code(@text) << ';' end |