Class: Utils::Patterns::RegexpPattern

Inherits:
Pattern show all
Defined in:
lib/utils/patterns.rb

Instance Attribute Summary

Attributes inherited from Pattern

#matcher

Instance Method Summary collapse

Methods inherited from Pattern

#method_missing

Constructor Details

#initialize(opts = {}) ⇒ RegexpPattern

Returns a new instance of RegexpPattern.


34
35
36
37
# File 'lib/utils/patterns.rb', line 34

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