Class: Flipper::Api::App
- Inherits:
-
Object
- Object
- Flipper::Api::App
- Defined in:
- lib/flipper/api.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
writeonly
Public: HTTP response code Use this method to update status code before responding.
Instance Method Summary collapse
-
#call(env) ⇒ Object
Public : Rack expects object that responds to call env - environment hash.
-
#initialize(status, headers, body) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(status, headers, body) ⇒ App
Returns a new instance of App.
23 24 25 26 27 |
# File 'lib/flipper/api.rb', line 23 def initialize(status, headers, body) @status = status @headers = headers @body = body end |
Instance Attribute Details
#status=(value) ⇒ Object (writeonly)
Public: HTTP response code Use this method to update status code before responding
21 22 23 |
# File 'lib/flipper/api.rb', line 21 def status=(value) @status = value end |
Instance Method Details
#call(env) ⇒ Object
Public : Rack expects object that responds to call env - environment hash
31 32 33 |
# File 'lib/flipper/api.rb', line 31 def call(env) response end |