Class: Ruber::ProjectFilesRuleChooser::RegexpRuleValidator
- Inherits:
-
Qt::Validator
- Object
- Qt::Validator
- Ruber::ProjectFilesRuleChooser::RegexpRuleValidator
- Defined in:
- lib/ruber/world/project_files_widget.rb
Overview
Validator class for regexp rules
It marks the text as @Qt::Validator::Intermediate@ if a valid regexp can’t be constructed from it and as @Qt::Validator::Acceptable@ if it can
Instance Method Summary collapse
-
#validate(input, _pos) ⇒ Integer
Override of @Qt::Validator#validate@.
Instance Method Details
#validate(input, _pos) ⇒ Integer
Override of @Qt::Validator#validate@
67 68 69 70 71 72 73 74 |
# File 'lib/ruber/world/project_files_widget.rb', line 67 def validate input, _pos begin Regexp.new(input) Acceptable rescue RegexpError Intermediate end end |