module ProcExtensions::Match
Public Class Methods
included(base)
click to toggle source
# 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
Public Instance Methods
match(other)
click to toggle source
rubocop:disable Lint/NestedMethodDefinition
# File lib/core_extensions/proc/match.rb, line 6 def match(other) ProcSource.new(other) == ProcSource.new(self) end