Class: Basecamp::DownloadResult

Inherits:
Data
  • Object
show all
Defined in:
lib/basecamp/download_result.rb

Overview

Result of downloading file content from a URL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body:, content_type: "", content_length: -1,, filename: "download") ⇒ DownloadResult

Returns a new instance of DownloadResult.



6
7
8
# File 'lib/basecamp/download_result.rb', line 6

def initialize(body:, content_type: "", content_length: -1, filename: "download")
  super
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



5
6
7
# File 'lib/basecamp/download_result.rb', line 5

def body
  @body
end

#content_lengthObject (readonly)

Returns the value of attribute content_length

Returns:

  • (Object)

    the current value of content_length



5
6
7
# File 'lib/basecamp/download_result.rb', line 5

def content_length
  @content_length
end

#content_typeObject (readonly)

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



5
6
7
# File 'lib/basecamp/download_result.rb', line 5

def content_type
  @content_type
end

#filenameObject (readonly)

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



5
6
7
# File 'lib/basecamp/download_result.rb', line 5

def filename
  @filename
end