Module: Lennarb::Router
- Defined in:
- lib/lennarb/router.rb
Overview
This module must be included in the class that will use the router.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/lennarb/router.rb', line 10 def self.included(base) base.extend(ClassMethods) base.instance_variable_set(:@router, Lennarb.new) base.define_singleton_method(:router) do base.instance_variable_get(:@router) end end |