summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb
diff options
context:
space:
mode:
authorBenjamin Sanders <ben@Benjamins-MacBook-Pro.local>2025-10-11 10:34:24 -0400
committerBenjamin Sanders <ben@Benjamins-MacBook-Pro.local>2025-10-11 10:34:24 -0400
commit5571dc766e2143e39762ff0b47c41d1c2e154f4c (patch)
treef4f124d314a7e76c04484515aa0fd1f2e271a601 /vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb
parent359f3309c97fc894b63e0a295c76ab298504d635 (diff)
Vendor bundled gems for deployment
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb')
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb b/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb
new file mode 100644
index 0000000..a584c3d
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/lib/terminal-table/util.rb
@@ -0,0 +1,13 @@
+module Terminal
+ class Table
+ module Util
+ # removes all ANSI escape sequences (e.g. color)
+ def ansi_escape(line)
+ line.to_s.gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, '').
+ gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, '').
+ gsub(/(\x03|\x1a)/, '')
+ end
+ module_function :ansi_escape
+ end
+ end
+end