Class: Tailnudge::Result
- Inherits:
-
Object
- Object
- Tailnudge::Result
- Defined in:
- lib/tailnudge/result.rb
Instance Method Summary collapse
-
#initialize(match, text) ⇒ Result
constructor
A new instance of Result.
- #message ⇒ Object
- #pattern_id ⇒ Object
Constructor Details
#initialize(match, text) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/tailnudge/result.rb', line 5 def initialize(match, text) @match = match @text = text end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/tailnudge/result.rb', line 10 def @match[1] || @text end |
#pattern_id ⇒ Object
14 15 16 |
# File 'lib/tailnudge/result.rb', line 14 def pattern_id @match.regexp.object_id end |