Class: FileUpload::TempFile
- Inherits:
-
Object
- Object
- FileUpload::TempFile
- Includes:
- RedisFileReadable
- Defined in:
- app/models/file_upload/temp_file.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#data ⇒ Object
Returns the value of attribute data.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TempFile
constructor
A new instance of TempFile.
- #persisted? ⇒ Boolean
Methods included from RedisFileReadable
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_type ⇒ Object
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 |
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'app/models/file_upload/temp_file.rb', line 3 def data @data end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'app/models/file_upload/temp_file.rb', line 3 def name @name end |
#size ⇒ Object
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
13 14 15 |
# File 'app/models/file_upload/temp_file.rb', line 13 def persisted? false end |