Class: Mustermann::Regular
- Inherits:
-
RegexpBased
- Object
- Pattern
- RegexpBased
- Mustermann::Regular
- Defined in:
- lib/mustermann/regular.rb
Overview
Regexp pattern implementation.
Instance Attribute Summary
Attributes inherited from RegexpBased
Instance Method Summary collapse
-
#initialize(string, **options) ⇒ Pattern
constructor
A new instance of Pattern.
Methods inherited from Pattern
#===, #=~, #expand, #match, #named_captures, #names, new, #params, supported?, supported_options, #to_s
Constructor Details
#initialize(string, **options) ⇒ Pattern
Returns a new instance of Pattern.
15 16 17 18 |
# File 'lib/mustermann/regular.rb', line 15 def initialize(string, **) string = $1 if string.to_s =~ /\A\(\?\-mix\:(.*)\)\Z/ && string.inspect == "/#$1/" super(string, **) end |