Module: Derailleur::Handler::Rack
- Included in:
- RackHandler
- Defined in:
- lib/derailleur/core/handler.rb
Overview
Accessors, and to_rack_output for things behaving like RackHandler
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#page ⇒ Object
Returns the value of attribute page.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize_rack ⇒ Object
Sets to default values the Rack specification fields [200, {}, ”].
-
#to_rack_output ⇒ Object
Returns an status, headers, and page array conforming to the Rack specification.
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
15 16 17 |
# File 'lib/derailleur/core/handler.rb', line 15 def headers @headers end |
#page ⇒ Object
Returns the value of attribute page.
15 16 17 |
# File 'lib/derailleur/core/handler.rb', line 15 def page @page end |
#status ⇒ Object
Returns the value of attribute status.
15 16 17 |
# File 'lib/derailleur/core/handler.rb', line 15 def status @status end |
Instance Method Details
#initialize_rack ⇒ Object
Sets to default values the Rack specification fields
- 200, {}, ”
25 26 27 28 29 |
# File 'lib/derailleur/core/handler.rb', line 25 def initialize_rack @status = 200 @headers = {} @page = '' end |
#to_rack_output ⇒ Object
Returns an status, headers, and page array conforming to the Rack specification
19 20 21 |
# File 'lib/derailleur/core/handler.rb', line 19 def to_rack_output [status, headers, page] end |