Class: Karafka::Web::Ui::Controllers::Responses::File

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/web/ui/controllers/responses/file.rb

Overview

Response that tells Roda to ship the content under a file name

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, file_name) ⇒ File

Returns a new instance of File.

Parameters:

  • content (String)

    data we want to send

  • file_name (String)

    name under which we want to send it



14
15
16
17
# File 'lib/karafka/web/ui/controllers/responses/file.rb', line 14

def initialize(content, file_name)
  @content = content
  @file_name = file_name
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



10
11
12
# File 'lib/karafka/web/ui/controllers/responses/file.rb', line 10

def content
  @content
end

#file_nameObject (readonly)

Returns the value of attribute file_name.



10
11
12
# File 'lib/karafka/web/ui/controllers/responses/file.rb', line 10

def file_name
  @file_name
end