Class: AnswerLayer::DownloadResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/answerlayer/responses/download_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body:, content_type: nil, filename: nil, status: nil, headers: {}) ⇒ DownloadResponse

Returns a new instance of DownloadResponse.



7
8
9
10
11
12
13
# File 'lib/answerlayer/responses/download_response.rb', line 7

def initialize(body:, content_type: nil, filename: nil, status: nil, headers: {})
  @body = body
  @content_type = content_type
  @filename = filename
  @status = status
  @headers = headers
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/answerlayer/responses/download_response.rb', line 5

def body
  @body
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



5
6
7
# File 'lib/answerlayer/responses/download_response.rb', line 5

def content_type
  @content_type
end

#filenameObject (readonly)

Returns the value of attribute filename.



5
6
7
# File 'lib/answerlayer/responses/download_response.rb', line 5

def filename
  @filename
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/answerlayer/responses/download_response.rb', line 5

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/answerlayer/responses/download_response.rb', line 5

def status
  @status
end