Module: Responders::ApiResponder
- Defined in:
- lib/responders/api_responder.rb
Instance Method Summary collapse
Instance Method Details
#api_options ⇒ Object
7 8 9 |
# File 'lib/responders/api_responder.rb', line 7 def { :api_version => api_version } end |
#api_version ⇒ Object
11 12 13 14 |
# File 'lib/responders/api_responder.rb', line 11 def api_version return controller.api_version if controller.respond_to? :api_version detect_api_version end |
#detect_api_version ⇒ Object
16 17 18 19 |
# File 'lib/responders/api_responder.rb', line 16 def detect_api_version return $1.to_i if request.path =~ /^\/api\/v(\d+)\// nil end |
#options ⇒ Object
3 4 5 |
# File 'lib/responders/api_responder.rb', line 3 def super.merge() end |