Class: Mgt::Routing::Router

Inherits:
Object show all
Defined in:
lib/routing/router.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#endpointsObject

Returns the value of attribute endpoints.



4
5
6
# File 'lib/routing/router.rb', line 4

def endpoints
  @endpoints
end

Instance Method Details

#draw(&block) ⇒ Object



5
6
7
# File 'lib/routing/router.rb', line 5

def draw(&block)
  instance_eval &block
end

#root(to) ⇒ Object



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

def root(to)
  get "/", to: to
end