Class: Qiita::ResponseRenderer
- Inherits:
-
Object
- Object
- Qiita::ResponseRenderer
- Defined in:
- lib/qiita/response_renderer.rb
Instance Method Summary collapse
-
#initialize(response, color: nil, show_header: nil, show_body: nil) ⇒ ResponseRenderer
constructor
A new instance of ResponseRenderer.
- #to_s ⇒ Object
Constructor Details
#initialize(response, color: nil, show_header: nil, show_body: nil) ⇒ ResponseRenderer
Returns a new instance of ResponseRenderer.
3 4 5 6 7 8 |
# File 'lib/qiita/response_renderer.rb', line 3 def initialize(response, color: nil, show_header: nil, show_body: nil) @response = response @color = color @show_body = show_body @show_header = show_header end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/qiita/response_renderer.rb', line 10 def to_s template % { status: status, headers: headers, body: body, } end |