Sha256: 53f0593bb39dac9b70c60069ecf18386b0bd276275c1b7b420076dff661207f6

Contents?: true

Size: 299 Bytes

Versions: 3

Compression:

Stored size: 299 Bytes

Contents

module ProcExtensions
  module Match
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
proc_extensions-0.2 lib/core_extensions/proc/match.rb
proc_extensions-0.1.2 lib/core_extensions/proc/match.rb
proc_extensions-0.1.0 lib/core_extensions/proc/match.rb