Class: Wsv::Response::TextBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/wsv/response/text_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(status, head: false, headers: {}) ⇒ TextBuilder

Returns a new instance of TextBuilder.



6
7
8
9
10
# File 'lib/wsv/response/text_builder.rb', line 6

def initialize(status, head: false, headers: {})
  @status = status
  @head = head
  @extra_headers = headers
end

Instance Method Details

#buildObject



12
13
14
# File 'lib/wsv/response/text_builder.rb', line 12

def build
  Response.new(status: @status, headers: response_headers, body: response_body)
end