Class: String

Inherits:
Object show all
Defined in:
lib/core_extensions.rb

Overview

The only really important matcher

Direct Known Subclasses

PathString

Instance Method Summary collapse

Instance Method Details

#boldObject

make a string bold


112
113
114
# File 'lib/core_extensions.rb', line 112

def bold
  "\033[1m#{self}"
end

#matcher(opts = {}) ⇒ Object


97
98
99
100
# File 'lib/core_extensions.rb', line 97

def matcher(opts = {})
  # if we have a leading : or a /:xyz - a matcher is already defined
  self =~ /(^:|\/:)/ ? PathString.new(self) : PathString.new(":#{self}")
end