Class: Punchout::Puncher::Matchable

Inherits:
Object
  • Object
show all
Defined in:
lib/punchout/puncher/matchable.rb,
lib/punchout/puncher/matchable/resolver.rb

Defined Under Namespace

Classes: Resolver

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matcher, thing) ⇒ Matchable

Returns a new instance of Matchable.



4
5
6
7
# File 'lib/punchout/puncher/matchable.rb', line 4

def initialize(matcher, thing)
  @matcher = matcher
  @thing = thing
end

Instance Attribute Details

#thingObject (readonly)

Returns the value of attribute thing.



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

def thing
  @thing
end

Instance Method Details

#conflicts?(other) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/punchout/puncher/matchable.rb', line 15

def conflicts?(other)
  false
end

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/punchout/puncher/matchable.rb', line 11

def matches?(subject)
  @matcher.matches?(subject)
end