Module: Regexp::WithSupportForSymbols

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



70
71
72
73
74
# File 'lib/quality_extensions/symbol/match.rb', line 70

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

Instance Method Details

#===(other) ⇒ Object



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

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