Class: Regexer::Utils::Handlers::QuantifierOptionsHandler::ExactlyOptionHandler
- Inherits:
-
Base
- Object
- BaseHandler
- Base
- Regexer::Utils::Handlers::QuantifierOptionsHandler::ExactlyOptionHandler
- Defined in:
- lib/regexer/utils/handlers/quantifier_options_handlers/exactly_option_handler.rb
Overview
A handler class to return the appropriate quantifier value if given the exactly option
Instance Method Summary collapse
Methods inherited from Base
#give_to_next_handler, #next_handler
Methods inherited from BaseHandler
Instance Method Details
#handle(value) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/regexer/utils/handlers/quantifier_options_handlers/exactly_option_handler.rb', line 13 def handle(value) if value.exactly Regexer::Validators::ConsecutiveInstancesOfOptionsValueValidator.value_valid?(value.exactly) "{#{value.exactly}}" else give_to_next_handler(value) end end |