Sha256: 8d5157ea6f2ee0824a7c71a2af412495b15007472db92b3244fdbd60aed345ec

Contents?: true

Size: 129 Bytes

Versions: 4

Compression:

Stored size: 129 Bytes

Contents

class String
  def highlight(color = :yellow)
    gsub(/\(([A-Za-z\s]+)\)/m, "#{Degica::ANSI.highlight('\1', color)}")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
degica-1.0.3 lib/degica/core_ext/string.rb
degica-1.0.2 lib/degica/core_ext/string.rb
degica-1.0.1 lib/degica/core_ext/string.rb
degica-1.0.0 lib/degica/core_ext/string.rb