Class: Mosaic::Response
- Inherits:
-
Object
- Object
- Mosaic::Response
- Defined in:
- lib/mosaic/response.rb
Overview
Used to build a response for sinatra to serve
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
-
#view_format ⇒ Object
Returns the value of attribute view_format.
Instance Method Summary collapse
-
#initialize(request) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(request) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 |
# File 'lib/mosaic/response.rb', line 7 def initialize(request) @view_format = :erb @output_format = :html @layout = :'layouts/application' @request = request @response_code = 200 end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
4 5 6 |
# File 'lib/mosaic/response.rb', line 4 def content @content end |
#layout ⇒ Object
Returns the value of attribute layout.
4 5 6 |
# File 'lib/mosaic/response.rb', line 4 def layout @layout end |
#output_format ⇒ Object
Returns the value of attribute output_format.
4 5 6 |
# File 'lib/mosaic/response.rb', line 4 def output_format @output_format end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
5 6 7 |
# File 'lib/mosaic/response.rb', line 5 def request @request end |
#response_code ⇒ Object
Returns the value of attribute response_code.
4 5 6 |
# File 'lib/mosaic/response.rb', line 4 def response_code @response_code end |
#view_format ⇒ Object
Returns the value of attribute view_format.
4 5 6 |
# File 'lib/mosaic/response.rb', line 4 def view_format @view_format end |