module Punchout::Matcher

When a user calls {Punchable#punch} with a `candidate`, each {Matchable} will call {Matcher#matches?} until one returns true.

Public Class Methods

new(subject) click to toggle source
# File lib/punchout/matcher.rb, line 6
def initialize(subject)
  @subject = subject
end

Public Instance Methods

conflicts?(other) click to toggle source
# File lib/punchout/matcher.rb, line 16
def conflicts?(other)
  false
end
punches(thing) click to toggle source

Creates a {Matchable} assocating this matcher with the thing it should return.

# File lib/punchout/matcher.rb, line 12
def punches(thing)
  Punchout::Puncher::Matchable.new(self, thing)
end