Class: Mv::Core::Router

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/mv/core/router.rb

Instance Method Summary collapse

Instance Method Details

#define_route(as, klass) ⇒ Object



15
16
17
# File 'lib/mv/core/router.rb', line 15

def define_route as, klass
  routing_table[as.to_sym] = klass
end

#route(validation) ⇒ Object



11
12
13
# File 'lib/mv/core/router.rb', line 11

def route validation
  routing_table[validation.as.to_sym].new(validation).route
end