Method: Doing::StringNormalize#normalize_case

Defined in:
lib/doing/normalize.rb

#normalize_case(default = :smart) ⇒ Object

Convert a case sensitivity string to a symbol



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/doing/normalize.rb', line 75

def normalize_case(default = :smart)
  case self
  when /^(c|sens)/i
    :sensitive
  when /^i/i
    :ignore
  when /^s/i
    :smart
  else
    default.is_a?(Symbol) ? default : default.normalize_case
  end
end