Module: TShield::Controller::ClassMethods
- Defined in:
- lib/tshield/controller.rb
Instance Method Summary collapse
Instance Method Details
#action(class_method, options) ⇒ Object
11 12 13 14 |
# File 'lib/tshield/controller.rb', line 11 def action(class_method, ) @@actions = {} unless defined? @@actions @@actions[class_method] = end |
#registered(app) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/tshield/controller.rb', line 16 def registered(app) @@actions.each do |class_method, | puts "== registering #{[:path]} for methods #{[:methods].join(',')} with action #{class_method}" [:methods].each do |method| app.send(method, [:path]) { send(class_method, params, request) } end end end |