Class: Mustermann::Set::Match
- Inherits:
-
Match
- Object
- Match
- Mustermann::Set::Match
- Defined in:
- lib/mustermann/set/match.rb
Overview
Subclass of Match that also includes the value associated with the pattern that produced the match.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
The value associated with the pattern that produced the match, if any.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(value: nil) ⇒ Match
constructor
A new instance of Match.
Constructor Details
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value associated with the pattern that produced the match, if any.
10 11 12 |
# File 'lib/mustermann/set/match.rb', line 10 def value @value end |
Instance Method Details
#eql?(other) ⇒ Boolean
20 |
# File 'lib/mustermann/set/match.rb', line 20 def eql?(other) = super && value == other.value |