Method: Doing::StringNormalize#normalize_matching
- Defined in:
- lib/doing/normalize.rb
#normalize_matching(default = :pattern) ⇒ Object
Convert a matching configuration string to a symbol
126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/doing/normalize.rb', line 126 def normalize_matching(default = :pattern) case self when /^f/i :fuzzy when /^p/i :pattern when /^e/i :exact else default.is_a?(Symbol) ? default : default.normalize_matching end end |