Class: Punchout::Puncher::Matchable
- Inherits:
-
Object
- Object
- Punchout::Puncher::Matchable
- Defined in:
- lib/punchout/puncher/matchable.rb
Instance Attribute Summary collapse
-
#thing ⇒ Object
readonly
Returns the value of attribute thing.
Instance Method Summary collapse
- #conflicts?(other) ⇒ Boolean
-
#initialize(matcher, thing) ⇒ Matchable
constructor
A new instance of Matchable.
- #matches?(subject) ⇒ Boolean
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
#thing ⇒ Object (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
15 16 17 |
# File 'lib/punchout/puncher/matchable.rb', line 15 def conflicts?(other) false end |
#matches?(subject) ⇒ Boolean
11 12 13 |
# File 'lib/punchout/puncher/matchable.rb', line 11 def matches?(subject) @matcher.matches?(subject) end |