Class: Punchout::Matcher::Progeny
- Inherits:
-
Object
- Object
- Punchout::Matcher::Progeny
- Includes:
- Punchout::Matcher
- Defined in:
- lib/punchout/matcher/progeny.rb
Overview
Matches when the candidate’s class matches the subject class of this matcher, or any descendant of that subject.
This Matcher is handy for punching against a set of classes that all mixin the same module.
Instance Method Summary collapse
Methods included from Punchout::Matcher
#conflicts?, #initialize, #punches
Instance Method Details
#matches?(candidate) ⇒ Boolean
14 15 16 |
# File 'lib/punchout/matcher/progeny.rb', line 14 def matches?(candidate) (@subject <= candidate.class) == true end |