Class: Docomoru::ResponseRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/docomoru/response_renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(response, show_header: nil, show_body: nil) ⇒ ResponseRenderer

Returns a new instance of ResponseRenderer.



6
7
8
9
10
# File 'lib/docomoru/response_renderer.rb', line 6

def initialize(response, show_header: nil, show_body: nil)
  @response = response
  @show_body = show_body
  @show_header = show_header
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
18
# File 'lib/docomoru/response_renderer.rb', line 12

def to_s
  template % {
    status: status,
    headers: headers,
    body: body,
  }
end