Module: Rad::Controller::Abstract::Miscellaneous
- Defined in:
- lib/rad/controller/_abstract/miscellaneous.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#respond_to(&block) ⇒ Object
respond_to.
Instance Method Details
#respond_to(&block) ⇒ Object
respond_to
5 6 7 8 9 10 11 12 |
# File 'lib/rad/controller/_abstract/miscellaneous.rb', line 5 def respond_to &block @_responder.must_be.nil @_responder = Rad::Controller::Abstract::Responder.new block.call @_responder handler = @_responder.handlers[params.format] raise "can't respond to '#{params.format}' format!" unless handler handler.call end |