Class: Punchout::Matcher::Klass

Inherits:
Object
  • Object
show all
Includes:
Punchout::Matcher
Defined in:
lib/punchout/matcher/class.rb

Overview

Matches when the candidate’s class matches the class of the subject of this matcher

Instance Method Summary collapse

Methods included from Punchout::Matcher

#conflicts?, #initialize, #punches

Instance Method Details

#matches?(candidate) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/punchout/matcher/class.rb', line 11

def matches?(candidate)
  @subject == candidate.class
end