Class: FileUpload::TempFile

Inherits:
Object
  • Object
show all
Includes:
RedisFileReadable
Defined in:
app/models/file_upload/temp_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RedisFileReadable

#key=

Constructor Details

#initialize(attributes = {}) ⇒ TempFile

Returns a new instance of TempFile.



7
8
9
10
11
# File 'app/models/file_upload/temp_file.rb', line 7

def initialize(attributes = {})
  attributes.each do |k, v|
    self.send("#{k}=", v) if respond_to?("#{k}=")
  end
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



3
4
5
# File 'app/models/file_upload/temp_file.rb', line 3

def content_type
  @content_type
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'app/models/file_upload/temp_file.rb', line 3

def data
  @data
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'app/models/file_upload/temp_file.rb', line 3

def name
  @name
end

#sizeObject

Returns the value of attribute size.



3
4
5
# File 'app/models/file_upload/temp_file.rb', line 3

def size
  @size
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/file_upload/temp_file.rb', line 13

def persisted?
  false
end