Sha256: 02babb1fea87284e95f6215cbe4600836a1faefeb08241f14b497759a93a472e
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
module Asciidoctor module Prawn module Images # Dispatch to suitable image method in Prawn based on file extension. def image file, opts = {} if (::File.extname file).downcase == '.svg' opts[:at] ||= bounds.top_left svg ::IO.read(file), opts else _builtin_image file, opts end end end end end module Prawn class Document alias :_builtin_image :image include ::Asciidoctor::Prawn::Images end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-pdf-1.5.0.alpha.7 | lib/asciidoctor-pdf/prawn_ext/images.rb |