Class: Sinicum::Imaging::DefaultConverter

Inherits:
Object
  • Object
show all
Includes:
Converter, Logger
Defined in:
lib/sinicum/imaging/default_converter.rb

Overview

Internal: Simple converter that simply serves a copy of the original file.

Constant Summary

Constants included from Converter

Converter::CONVERTER_VERSION, Converter::PNG_OPTIMIZER_SUFFIX

Instance Attribute Summary

Attributes included from Converter

#document

Instance Method Summary collapse

Methods included from Logger

included, #logger

Methods included from Converter

#config_hash, #interlace_option, #ratio

Constructor Details

#initialize(configuration) ⇒ DefaultConverter

Returns a new instance of DefaultConverter.



8
9
# File 'lib/sinicum/imaging/default_converter.rb', line 8

def initialize(configuration)
end

Instance Method Details

#convert(infile_path, outfile_path) ⇒ Object



11
12
13
# File 'lib/sinicum/imaging/default_converter.rb', line 11

def convert(infile_path, outfile_path)
  `cp #{infile_path} #{outfile_path}`
end

#formatObject



15
16
17
# File 'lib/sinicum/imaging/default_converter.rb', line 15

def format
  ".#{@document[:document][:extension]}" if @document && @document[:document]
end