class PatternMatching::CaseEqualityReversal

Used by #Match to invert the call to `===` by `when` clauses

Public Class Methods

new(*pattern) click to toggle source
# File lib/pattern_matching/case_equality_reversal.rb, line 6
def initialize(*pattern)
  @pattern = pattern
end

Public Instance Methods

===(other) click to toggle source
# File lib/pattern_matching/case_equality_reversal.rb, line 10
def ===(other)
  other.===(*@pattern)
end