Class: ShatteredMachine::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/shattered_machine/converter.rb

Overview

Convert jpg image in png image

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ Converter

Returns a new instance of Converter.

Parameters:



9
10
11
# File 'lib/shattered_machine/converter.rb', line 9

def initialize(io)
  @io = io
end

Instance Method Details

#callboolean

Returns status of conversion.

Returns:

  • (boolean)

    status of conversion



14
15
16
17
18
# File 'lib/shattered_machine/converter.rb', line 14

def call
  @io.jpg_images.each do |jpg|
    RustyEngine.convert(jpg.input, jpg.output)
  end
end