Sha256: 821743029b51c5dfd57ad059e603a4da5dd0c0c7772792e96c2e6eacec36b24d

Contents?: true

Size: 265 Bytes

Versions: 1

Compression:

Stored size: 265 Bytes

Contents

module PatternMatching
  ##
  # Used by #Match to invert the call to `===` by `when` clauses
  class CaseEqualityReversal < BasicObject

    def initialize(*pattern)
      @pattern = pattern
    end

    def ===(other)
      other.===(*@pattern)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pattern_matching-0.1.0 lib/pattern_matching/case_equality_reversal.rb