Class: Utils::Patterns::RegexpPattern
- Defined in:
- lib/utils/patterns.rb
Instance Attribute Summary
Attributes inherited from Pattern
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Regexp
constructor
Initializes a regular expression pattern matcher with the specified options.
Methods inherited from Pattern
Constructor Details
#initialize(opts = {}) ⇒ Regexp
Initializes a regular expression pattern matcher with the specified options.
This method sets up a regular expression object based on the pattern string and case sensitivity configuration that was previously initialized in the parent class. It compiles the pattern into a Regexp object that can be used for matching operations throughout the pattern matching process.
89 90 91 92 93 94 |
# File 'lib/utils/patterns.rb', line 89 def initialize(opts = {}) super @matcher = Regexp.new( @pattern, @icase ? Regexp::IGNORECASE : 0 ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Utils::Patterns::Pattern