Method: Repofetch::Util#remove_format_params
- Defined in:
- lib/repofetch/util.rb
#remove_format_params(str) ⇒ Object
Converts a format string into a plain string (e.g. “%{green}OK” -> “OK”)
7 8 9 |
# File 'lib/repofetch/util.rb', line 7 def remove_format_params(str) str.gsub(/%{[\w\d]+?}/, '') end |