Class: Libis::Format::Converter::OfficeConverter
- Inherits:
-
Base
- Object
- Base
- Libis::Format::Converter::OfficeConverter
show all
- Defined in:
- lib/libis/format/converter/office_converter.rb
Instance Attribute Summary
Attributes inherited from Base
#flags, #options
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
inherited, #initialize, #using_temp, using_temp
Class Method Details
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/libis/format/converter/office_converter.rb', line 14
def self.input_types
[
:TXT,
:RTF,
:HTML,
:MSDOC,
:MSXLS,
:MSPPT,
:MSDOCX,
:MSXLSX,
:MSPPTX,
:WORDPERFECT,
]
end
|
.output_types(format = nil) ⇒ Object
29
30
31
32
|
# File 'lib/libis/format/converter/office_converter.rb', line 29
def self.output_types(format = nil)
return [] unless input_types.include?(format)
[:PDF]
end
|
Instance Method Details
#convert(source, target, format, opts = {}) ⇒ Object
38
39
40
41
42
43
44
45
|
# File 'lib/libis/format/converter/office_converter.rb', line 38
def convert(source, target, format, opts = {})
super
return nil unless OfficeToPdf.run(source, target)
target
end
|
#office_convert(_) ⇒ Object
34
35
36
|
# File 'lib/libis/format/converter/office_converter.rb', line 34
def office_convert(_)
end
|