Module: Mojito::Controllers
- Defined in:
- lib/mojito/controllers.rb,
lib/mojito/controllers/method.rb,
lib/mojito/controllers/runtime.rb,
lib/mojito/controllers/sinatra.rb,
lib/mojito/controllers/entities.rb
Defined Under Namespace
Modules: Entities, Method, Runtime, Sinatra
Class Method Summary collapse
Class Method Details
.method_controller(*modules, &block) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/mojito/controllers/method.rb', line 52 def self.method_controller(*modules, &block) Class.new.tap do |controller| controller.instance_exec do include Mojito::Base include Mojito::Controllers::Method modules.each do |mod| include mod end end controller.class_exec &block if block end end |