Class: Spider::UploadedFile

Inherits:
Tempfile
  • Object
show all
Defined in:
lib/spiderfw/http/http.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, content_type) ⇒ UploadedFile

Returns a new instance of UploadedFile



317
318
319
320
321
322
# File 'lib/spiderfw/http/http.rb', line 317

def initialize(filename, content_type)
    @filename = filename
    @content_type = content_type
    super('uploaded', Spider.paths[:tmp])
    
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type



315
316
317
# File 'lib/spiderfw/http/http.rb', line 315

def content_type
  @content_type
end

#filenameObject (readonly)

Returns the value of attribute filename



315
316
317
# File 'lib/spiderfw/http/http.rb', line 315

def filename
  @filename
end