Class: Jimson::Router

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/jimson/router.rb,
lib/jimson/router/map.rb

Defined Under Namespace

Classes: Map

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Router

Returns a new instance of Router.



14
15
16
# File 'lib/jimson/router.rb', line 14

def initialize(opts = {})
  @map = Map.new(opts)
end

Instance Method Details

#draw(&block) ⇒ Object



18
19
20
21
# File 'lib/jimson/router.rb', line 18

def draw(&block)
  @map.instance_eval &block
  self
end