Module: Rabbit::ImageManipulable

Extended by:
Forwardable
Included in:
Element::Image, ImageLoader
Defined in:
lib/rabbit/image.rb,
lib/rabbit/image/dia.rb,
lib/rabbit/image/eps.rb,
lib/rabbit/image/pdf.rb,
lib/rabbit/image/svg.rb,
lib/rabbit/image/base.rb,
lib/rabbit/image/gimp.rb,
lib/rabbit/image/default.rb

Defined Under Namespace

Classes: Base, Default, Dia, EPS, GIMP, PDF, SVG

Instance Method Summary collapse

Instance Method Details

#initialize(filename, props = nil, *args, &block) ⇒ Object


40
41
42
43
44
45
46
# File 'lib/rabbit/image.rb', line 40

def initialize(filename, props=nil, *args, &block)
  unless File.exist?(filename)
    raise ImageFileDoesNotExistError.new(filename)
  end
  super(*args, &block)
  @loader = Base.find_loader(filename).new(filename, props)
end