Class: Punchout::Matcher

Inherits:
Object
  • Object
show all
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

Direct Known Subclasses

Ancestry, Equal, Klass, Progeny

Defined Under Namespace

Classes: Ancestry, Equal, Klass, Progeny

Instance Method Summary collapse

Constructor Details

#initialize(subject) ⇒ Matcher

Returns a new instance of Matcher.



5
6
7
# File 'lib/punchout/matcher.rb', line 5

def initialize(subject)
  @subject = subject
end

Instance Method Details

#conflicts?(other) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/punchout/matcher.rb', line 13

def conflicts?(other)
  false
end

#punches(thing) ⇒ Object



9
10
11
# File 'lib/punchout/matcher.rb', line 9

def punches(thing)
  Punchout::Puncher::Matchable.new(self, thing)
end