Class: Pludoni::Pdfutils::LocalFileWrapper
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from FileWrapper
#initialize, make
Instance Attribute Details
#filename ⇒ Object
11
12
13
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 11
def filename
@filename || @file.path.split("/").last
end
|
Instance Method Details
#content_type ⇒ Object
24
25
26
27
28
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 24
def content_type
Marcel::MimeType.for(@file)
ensure
@file.rewind
end
|
#filesize ⇒ Object
7
8
9
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 7
def filesize
@file.size
end
|
#open(&block) ⇒ Object
20
21
22
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 20
def open(&block)
@file.open(&block)
end
|
#to_tf ⇒ Object
15
16
17
18
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 15
def to_tf
@file.rewind
@file
end
|