Method: Mojito::ClassMethods#controller
- Defined in:
- lib/mojito.rb
#controller(name, options = {}) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/mojito.rb', line 43 def controller(name, = {}) mod = Mojito::Controllers.const_get name.to_s.camel_case.to_sym [*[:rendering]].each {|r| rendering r } [*[:helpers]].each {|h| helper h } include mod end |