Module: PatternMatch::KeyMatcher

Included in:
Hash
Defined in:
lib/pattern-match/experimental.rb

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



76
77
78
79
80
81
82
# File 'lib/pattern-match/experimental.rb', line 76

def self.included(klass)
  class << klass
    def pattern_matcher(*subpatterns)
      PatternKeywordArgStyleDeconstructor.new(self, :has_key?, :[], *subpatterns)
    end
  end
end