Module: ProcExtensions::Match
- Defined in:
- lib/core_extensions/proc/match.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/core_extensions/proc/match.rb', line 3 def self.included(base) base.class_eval do # rubocop:disable Lint/NestedMethodDefinition def match(other) ProcSource.new(other) == ProcSource.new(self) end alias_method :=~, :match end end |