Module: Mustermann

Defined in:
lib/mustermann.rb,
lib/mustermann/ast.rb,
lib/mustermann/error.rb,
lib/mustermann/rails.rb,
lib/mustermann/shell.rb,
lib/mustermann/simple.rb,
lib/mustermann/pattern.rb,
lib/mustermann/sinatra.rb,
lib/mustermann/version.rb,
lib/mustermann/identity.rb,
lib/mustermann/template.rb,
lib/mustermann/extension.rb,
lib/mustermann/regexp_based.rb,
lib/mustermann/simple_match.rb

Overview

Namespace and main entry point for the Mustermann library.

Under normal circumstences the only external API entry point you should be using is Mustermann.new.

Defined Under Namespace

Modules: Extension Classes: AST, CompileError, Error, Identity, ParseError, Pattern, Rails, RegexpBased, Shell, Simple, SimpleMatch, Sinatra, Template

Class Method Summary collapse

Class Method Details

.new(string, type: :sinatra, **options) ⇒ Mustermann::Pattern

Returns pattern corresponding to string.

Parameters:

  • string (String)

    The string represenation of the new pattern

  • options (Hash)

    The options hash

Returns:

See Also:



9
10
11
# File 'lib/mustermann.rb', line 9

def self.new(string, type: :sinatra, **options)
  options.any? ? self[type].new(string, **options) : self[type].new(string)
end