class Punchout::Matcher::Progeny

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.

Public Instance Methods

matches?(candidate) click to toggle source
# File lib/punchout/matcher/progeny.rb, line 14
def matches?(candidate)
  (@subject <= candidate.class) == true
end