Module: Punchout::Matcher
- Defined in:
- lib/punchout/matcher.rb,
lib/punchout/matcher/class.rb,
lib/punchout/matcher/equal.rb,
lib/punchout/matcher/progeny.rb,
lib/punchout/matcher/ancestry.rb
Overview
When a user calls Punchable#punch with a ‘candidate`, each Matchable will call Matcher#matches? until one returns true.
Defined Under Namespace
Classes: Ancestry, Equal, Klass, Progeny
Instance Method Summary collapse
- #conflicts?(other) ⇒ Boolean
- #initialize(subject) ⇒ Object
-
#punches(thing) ⇒ Object
Creates a Matchable assocating this matcher with the thing it should return.
Instance Method Details
#conflicts?(other) ⇒ Boolean
16 17 18 |
# File 'lib/punchout/matcher.rb', line 16 def conflicts?(other) false end |
#initialize(subject) ⇒ Object
6 7 8 |
# File 'lib/punchout/matcher.rb', line 6 def initialize(subject) @subject = subject end |