Class: Jets::Controller::Response
- Inherits:
-
Object
- Object
- Jets::Controller::Response
- Defined in:
- lib/jets/controller/response.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(event) ⇒ Response
constructor
A new instance of Response.
- #set_header(k, v) ⇒ Object
Constructor Details
#initialize(event) ⇒ Response
Returns a new instance of Response.
4 5 6 7 |
# File 'lib/jets/controller/response.rb', line 4 def initialize(event) @event = event @headers = {} end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/jets/controller/response.rb', line 3 def headers @headers end |
Instance Method Details
#set_header(k, v) ⇒ Object
9 10 11 |
# File 'lib/jets/controller/response.rb', line 9 def set_header(k,v) @headers[k] = v end |