Class: TTY::Table::Operation::Escape Private
- Inherits:
-
Object
- Object
- TTY::Table::Operation::Escape
- Defined in:
- lib/tty/table/operation/escape.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A class responsible for escaping special chars in a table field
Instance Method Summary collapse
-
#call(field, row, col) ⇒ Object
Escape special characters in a table field.
Instance Method Details
#call(field, row, col) ⇒ Object
Escape special characters in a table field
21 22 23 24 25 |
# File 'lib/tty/table/operation/escape.rb', line 21 def call(field, row, col) field.content.gsub(/(\t|\r|\n)/) do |val| val.dump.gsub('"', "") end end |