Class: Restfulie::Server::ActionController::ParamsParser2
- Inherits:
-
Object
- Object
- Restfulie::Server::ActionController::ParamsParser2
- Defined in:
- lib/restfulie/server/action_controller/params_parser.rb
Overview
This class is just a proxy for the extension point offered by ActionController::Base
Instance Method Summary collapse
- #param_parsers ⇒ Object
- #register(content_type, representation) ⇒ Object
- #unregister(content_type) ⇒ Object
Instance Method Details
#param_parsers ⇒ Object
20 21 22 |
# File 'lib/restfulie/server/action_controller/params_parser.rb', line 20 def param_parsers ::ActionController::Base.param_parsers end |
#register(content_type, representation) ⇒ Object
24 25 26 |
# File 'lib/restfulie/server/action_controller/params_parser.rb', line 24 def register(content_type, representation) param_parsers[Mime::Type.lookup(content_type)] = representation.method(:to_hash).to_proc end |
#unregister(content_type) ⇒ Object
28 29 30 |
# File 'lib/restfulie/server/action_controller/params_parser.rb', line 28 def unregister(content_type) param_parsers.delete(Mime::Type.lookup(content_type)) end |