Class: Bureaucrat::TemporaryUploadedFile

Inherits:
Object
  • Object
show all
Defined in:
lib/bureaucrat/temporary_uploaded_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject

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

#filenameObject

Returns the value of attribute filename.



3
4
5
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3

def filename
  @filename
end

#headObject

Returns the value of attribute head.



3
4
5
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3

def head
  @head
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3

def name
  @name
end

#sizeObject

Returns the value of attribute size.



3
4
5
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3

def size
  @size
end

#tempfileObject

Returns the value of attribute tempfile.



3
4
5
# File 'lib/bureaucrat/temporary_uploaded_file.rb', line 3

def tempfile
  @tempfile
end