Module: MiniMagick
- Defined in:
- lib/mini_magick.rb,
lib/mini_magick/image.rb,
lib/mini_magick/errors.rb,
lib/mini_magick/version.rb,
lib/mini_magick/utilities.rb,
lib/mini_magick/command_builder.rb
Defined Under Namespace
Modules: Utilities, VERSION Classes: CommandBuilder, Error, Image, Invalid
Class Attribute Summary collapse
-
.debug ⇒ Object
Returns the value of attribute debug.
-
.processor ⇒ Object
Tries to detect the current processor based if any of the processors exist.
-
.processor_path ⇒ Object
Returns the value of attribute processor_path.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
-
.validate_on_create ⇒ Object
Returns the value of attribute validate_on_create.
-
.validate_on_write ⇒ Object
Returns the value of attribute validate_on_write.
Class Method Summary collapse
-
.gm? ⇒ Boolean
Checks whether the current processor is graphicsmagick.
-
.image_magick_version ⇒ Object
Discovers the imagemagick version based on mogrify’s output.
-
.minimum_image_magick_version ⇒ Object
The minimum allowed imagemagick version.
-
.mogrify? ⇒ Boolean
Checks whether the current processory is mogrify.
-
.valid_version_installed? ⇒ Boolean
Checks whether the imagemagick’s version is valid.
-
.version ⇒ Object
Returns the version of the currently loaded MiniMagick as a
Gem::Version
.
Class Attribute Details
.debug ⇒ Object
Returns the value of attribute debug.
14 15 16 |
# File 'lib/mini_magick.rb', line 14 def debug @debug end |
.processor ⇒ Object
Tries to detect the current processor based if any of the processors exist. Mogrify have precedence over gm by default.
Returns
- Symbol
-
The detected procesor
24 25 26 |
# File 'lib/mini_magick.rb', line 24 def processor @processor end |
.processor_path ⇒ Object
Returns the value of attribute processor_path.
12 13 14 |
# File 'lib/mini_magick.rb', line 12 def processor_path @processor_path end |
.timeout ⇒ Object
Returns the value of attribute timeout.
13 14 15 |
# File 'lib/mini_magick.rb', line 13 def timeout @timeout end |
.validate_on_create ⇒ Object
Returns the value of attribute validate_on_create.
15 16 17 |
# File 'lib/mini_magick.rb', line 15 def validate_on_create @validate_on_create end |
.validate_on_write ⇒ Object
Returns the value of attribute validate_on_write.
16 17 18 |
# File 'lib/mini_magick.rb', line 16 def validate_on_write @validate_on_write end |
Class Method Details
.gm? ⇒ Boolean
Checks whether the current processor is graphicsmagick.
Returns
- Boolean
71 72 73 |
# File 'lib/mini_magick.rb', line 71 def gm? processor && processor.to_sym == :gm end |
.image_magick_version ⇒ Object
Discovers the imagemagick version based on mogrify’s output.
Returns
-
The imagemagick version
35 36 37 |
# File 'lib/mini_magick.rb', line 35 def image_magick_version @@version ||= Gem::Version.create(`mogrify --version`.split(' ')[2].split('-').first) end |
.minimum_image_magick_version ⇒ Object
The minimum allowed imagemagick version
Returns
-
The minimum imagemagick version
44 45 46 |
# File 'lib/mini_magick.rb', line 44 def minimum_image_magick_version @@minimum_version ||= Gem::Version.create('6.6.3') end |
.mogrify? ⇒ Boolean
Checks whether the current processory is mogrify.
Returns
- Boolean
62 63 64 |
# File 'lib/mini_magick.rb', line 62 def mogrify? processor && processor.to_sym == :mogrify end |
.valid_version_installed? ⇒ Boolean
Checks whether the imagemagick’s version is valid
Returns
- Boolean
53 54 55 |
# File 'lib/mini_magick.rb', line 53 def valid_version_installed? image_magick_version >= minimum_image_magick_version end |