Method: Mustermann::Pattern#initialize

Defined in:
lib/mustermann/pattern.rb

#initialize(string, **options) ⇒ Pattern

Returns a new instance of Pattern.

Parameters:

  • string (String)

    the string representation of the pattern

  • options (Hash)

    options for fine-tuning the pattern behavior

Raises:

  • (Mustermann::Error)

    if the pattern can’t be generated from the string

See Also:



55
56
57
58
# File 'lib/mustermann/pattern.rb', line 55

def initialize(string, uri_decode: true, **options)
  @uri_decode = uri_decode
  @string     = string.dup
end