Class: TextDetector::Detector::Regexp
- Defined in:
- lib/text_detector/detector/regexp.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from TextDetector::Detector::Base
Instance Method Details
#detect(text) ⇒ Object
6 7 8 9 |
# File 'lib/text_detector/detector/regexp.rb', line 6 def detect(text) detected = @re.match(text) detected ? detected.to_s : nil end |