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,
lib/rabbit/image/mermaid.rb
Defined Under Namespace
Classes: Base, Default, Dia, EPS, GIMP, Mermaid, PDF, SVG
Instance Method Summary collapse
Instance Method Details
#initialize(filename, props = nil, *args, canvas: nil, &block) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/rabbit/image.rb', line 41 def initialize(filename, props=nil, *args, canvas: nil, &block) unless File.exist?(filename) raise ImageFileDoesNotExistError.new(filename) end super(*args, &block) @loader = Base.find_loader(filename).new(filename, props, canvas: canvas) end |