Class: Regexer::Utils::Handlers::AnyCharacterInInputValueHandlers::CharacterRangePatternHandler
- Inherits:
-
Base
- Object
- BaseHandler
- Base
- Regexer::Utils::Handlers::AnyCharacterInInputValueHandlers::CharacterRangePatternHandler
- Defined in:
- lib/regexer/utils/handlers/any_character_in_input_value_handlers/character_range_pattern_handler.rb
Overview
A handler class to check if input value is a CharacterRangePattern object if true, should return a string based on values in that object
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 |
# File 'lib/regexer/utils/handlers/any_character_in_input_value_handlers/character_range_pattern_handler.rb', line 13 def handle(value) if value.instance_of?(Regexer::Models::CharacterRangePattern) "#{value.from}-#{value.to}" else give_to_next_handler(value) end end |