Module: Regexp::WithSupportForSymbols

Defined in:
lib/qualitysmith_extensions/symbol/match.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



71
72
73
74
75
# File 'lib/qualitysmith_extensions/symbol/match.rb', line 71

def self.extended(base)
  base.class.class_eval do
    alias_method :eee_without_support_for_symbols, :===
  end
end

Instance Method Details

#===(other) ⇒ Object



76
77
78
79
80
81
82
83
# File 'lib/qualitysmith_extensions/symbol/match.rb', line 76

def === (other)
  case other
  when Symbol
    eee_without_support_for_symbols(other.to_s)
  else
    eee_without_support_for_symbols(other)
  end
end