Class: Rabbit::ImageManipulable::EPS
- Includes:
- SystemRunner
- Defined in:
- lib/rabbit/image/eps.rb
Constant Summary collapse
- GS_COMMANDS =
%w(gs gswin32c)
Constants included from ModuleLoader
Instance Attribute Summary
Attributes inherited from Base
#height, #original_height, #original_width, #width
Class Method Summary collapse
Methods included from SystemRunner
Methods inherited from Base
#[], #[]=, #draw, #initialize, #keep_ratio, #keep_ratio=, #pixbuf, #resize
Methods included from ModuleLoader
extend_object, #find_loader, #loaders, #push_loader, #unshift_loader
Constructor Details
This class inherits a constructor from Rabbit::ImageManipulable::Base
Class Method Details
.match?(filename) ⇒ Boolean
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rabbit/image/eps.rb', line 16 def match?(filename) File.open(filename) do |f| begin f.each_line do |line| case line when /^%!PS-Adobe-\d+.\d+ EPS/i return true when /^%%/ # ignore else return false end end false rescue EncodingError, ArgumentError false end end end |