Class: Bureaucrat::TemporaryUploadedFile
- Inherits:
-
Object
- Object
- Bureaucrat::TemporaryUploadedFile
- Defined in:
- lib/bureaucrat/temporary_uploaded_file.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#head ⇒ Object
Returns the value of attribute head.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#tempfile ⇒ Object
Returns the value of attribute tempfile.
Instance Method Summary collapse
-
#initialize(data) ⇒ TemporaryUploadedFile
constructor
A new instance of TemporaryUploadedFile.
Constructor Details
#initialize(data) ⇒ TemporaryUploadedFile
Returns a new instance of TemporaryUploadedFile.
5 6 7 8 9 10 11 12 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 5 def initialize(data) @filename = data[:filename] @content_type = data[:content_type] @name = data[:name] @tempfile = data[:tempfile] @size = @tempfile.size @head = data[:head] end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def content_type @content_type end |
#filename ⇒ Object
Returns the value of attribute filename.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def filename @filename end |
#head ⇒ Object
Returns the value of attribute head.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def head @head end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def size @size end |
#tempfile ⇒ Object
Returns the value of attribute tempfile.
3 4 5 |
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3 def tempfile @tempfile end |