Class: Filter::Matchers::Class

Inherits:
Base
  • Object
show all
Defined in:
lib/filter/matchers/class.rb

Instance Attribute Summary

Attributes inherited from Base

#pattern

Instance Method Summary collapse

Methods inherited from Base

#and, #initialize, #or

Constructor Details

This class inherits a constructor from Filter::Matchers::Base

Instance Method Details

#===(other) ⇒ Object



4
5
6
7
8
# File 'lib/filter/matchers/class.rb', line 4

def ===(other)
  other.is_a?(::Class) || other.is_a?(::Module) ?
      other <= pattern :
      other.is_a?(pattern)
end