Class: ImageRuby::DevilFileLoader

Inherits:
FileLoader
  • Object
show all
Includes:
TempFileMethods
Defined in:
lib/devil_persistor/devil_loader.rb

Instance Method Summary collapse

Methods included from TempFileMethods

#create_temp_file, #create_temp_path, #use_temp_file

Instance Method Details

#load(path) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/devil_persistor/devil_loader.rb', line 30

def load(path)

  if path.respond_to? :devil_path
    raise UnableToLoadException
  end

  path2 = create_temp_path("img2") + ".bmp"

  def path2.devil_path

  end

  use_temp_file(path2) do
    Devil.with_image(path) do |img|
      img.save(path2)
    end

    ImageRuby::FileLoader.load(path2)
  end
end