Class: Rabbit::Searcher
- Inherits:
-
Object
- Object
- Rabbit::Searcher
- Defined in:
- lib/rabbit/searcher.rb
Instance Method Summary collapse
-
#initialize(canvas) ⇒ Searcher
constructor
A new instance of Searcher.
- #regexp(text) ⇒ Object
Constructor Details
#initialize(canvas) ⇒ Searcher
Returns a new instance of Searcher.
5 6 7 |
# File 'lib/rabbit/searcher.rb', line 5 def initialize(canvas) @canvas = canvas end |
Instance Method Details
#regexp(text) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rabbit/searcher.rb', line 9 def regexp(text) unless text == @text @text = text @regexp = nil end @regexp ||= internal_regexp end |