Class: ImageRuby::FileLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/imageruby/fileloader.rb

Direct Known Subclasses

DecoderLoader

Defined Under Namespace

Classes: UnableToLoadException

Class Method Summary collapse

Class Method Details

.load(path) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/imageruby/fileloader.rb', line 31

def self.load(path)
  FileLoader.each_subclass do |sc|
    loader = sc.new

    begin
      return loader.load(path)
    rescue UnableToLoadException
    end
  end

  raise UnableToLoadException
end