module Responders::ApiResponder
Public Instance Methods
api_options()
click to toggle source
# File lib/responders/api_responder.rb, line 7 def api_options { :api_version => api_version } end
api_version()
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
Calls superclass method
# File lib/responders/api_responder.rb, line 3 def options super.merge(api_options) end