class Punchout::Matcher::Ancestry

Matches when the candidate's class matches the subject class of this matcher, or any ancestor of that subject.

`Matcher::Ancestry.new([]).matches?(Enumerable) => true`

Public Instance Methods

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