Class: AcceptableApi::Application
- Inherits:
-
Object
- Object
- AcceptableApi::Application
- Defined in:
- lib/acceptable_api/application.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(mappers, routes) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(mappers, routes) ⇒ Application
Returns a new instance of Application.
9 10 11 12 |
# File 'lib/acceptable_api/application.rb', line 9 def initialize mappers, routes self.mappers = mappers self.routes = routes end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 |
# File 'lib/acceptable_api/application.rb', line 14 def call env request = Rack::Request.new env action = action_for request action.execute end |