Class: TestServer::FileUpload
- Inherits:
-
Object
- Object
- TestServer::FileUpload
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations
- Defined in:
- app/models/test_server/file_upload.rb
Instance Attribute Summary collapse
-
#checksum_calculation ⇒ Object
readonly
Returns the value of attribute checksum_calculation.
-
#filetype_detection ⇒ Object
readonly
Returns the value of attribute filetype_detection.
-
#virus_scan ⇒ Object
readonly
Returns the value of attribute virus_scan.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ FileUpload
constructor
A new instance of FileUpload.
- #persisted? ⇒ Boolean
- #uploaded_file ⇒ Object
- #uploaded_file=(file) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ FileUpload
Returns a new instance of FileUpload.
10 11 12 13 14 |
# File 'app/models/test_server/file_upload.rb', line 10 def initialize(attributes = {}) Hash(attributes).each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#checksum_calculation ⇒ Object (readonly)
Returns the value of attribute checksum_calculation.
8 9 10 |
# File 'app/models/test_server/file_upload.rb', line 8 def checksum_calculation @checksum_calculation end |
#filetype_detection ⇒ Object (readonly)
Returns the value of attribute filetype_detection.
8 9 10 |
# File 'app/models/test_server/file_upload.rb', line 8 def filetype_detection @filetype_detection end |
#virus_scan ⇒ Object (readonly)
Returns the value of attribute virus_scan.
8 9 10 |
# File 'app/models/test_server/file_upload.rb', line 8 def virus_scan @virus_scan end |
Instance Method Details
#persisted? ⇒ Boolean
37 38 39 |
# File 'app/models/test_server/file_upload.rb', line 37 def persisted? false end |
#uploaded_file ⇒ Object
33 34 35 |
# File 'app/models/test_server/file_upload.rb', line 33 def uploaded_file @uploaded_file || UploadedFile.new(nil) end |
#uploaded_file=(file) ⇒ Object
29 30 31 |
# File 'app/models/test_server/file_upload.rb', line 29 def uploaded_file=(file) @uploaded_file = UploadedFile.new(file) end |