Class: Pludoni::Pdfutils::LocalFileWrapper
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from FileWrapper
#initialize, make
Instance Attribute Details
#filename ⇒ Object
10
11
12
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 10
def filename
@filename || @file.path.split("/").last
end
|
Instance Method Details
#content_type ⇒ Object
23
24
25
26
27
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 23
def content_type
MimeMagic.by_magic(@file.read).type
ensure
@file.rewind
end
|
#filesize ⇒ Object
6
7
8
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 6
def filesize
@file.size
end
|
#open(&block) ⇒ Object
19
20
21
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 19
def open(&block)
@file.open(&block)
end
|
#to_tf ⇒ Object
14
15
16
17
|
# File 'lib/pludoni/pdfutils/local_file_wrapper.rb', line 14
def to_tf
@file.rewind
@file
end
|