Method: Mustermann::Router::Simple#initialize
- Defined in:
- lib/mustermann/router/simple.rb
permalink #initialize(default: nil, **options, &block) ⇒ Mustermann::Router::Simple
Returns new router instance.
54 55 56 57 58 59 60 |
# File 'lib/mustermann/router/simple.rb', line 54 def initialize(default: nil, **, &block) @options = @map = [] @default = default block.arity == 0 ? instance_eval(&block) : yield(self) if block end |