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

#matcher(opts = {}) ⇒ Object



21
22
23
24
# File 'lib/core_extensions.rb', line 21

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