Module: MiniMagick

Extended by:
Configuration
Defined in:
lib/mini_magick.rb,
lib/mini_magick/tool.rb,
lib/mini_magick/image.rb,
lib/mini_magick/shell.rb,
lib/mini_magick/version.rb,
lib/mini_magick/utilities.rb,
lib/mini_magick/image/info.rb,
lib/mini_magick/configuration.rb

Defined Under Namespace

Modules: Configuration, Utilities, VERSION Classes: Image, Shell, Tool

Constant Summary collapse

Error =
Class.new(RuntimeError)
Invalid =
Class.new(StandardError)
TimeoutError =
Class.new(Error)

Instance Attribute Summary

Attributes included from Configuration

#cli_prefix, #errors, #logger, #timeout, #tmpdir, #warnings

Class Method Summary collapse

Methods included from Configuration

configure, extended

Class Method Details

.cli_versionString

Returns ImageMagick version.

Returns:

  • (String)


35
36
37
38
# File 'lib/mini_magick.rb', line 35

def self.cli_version
  output = MiniMagick.identify(&:version)
  output[/\d+\.\d+\.\d+(-\d+)?/]
end

.imagemagick7?Boolean

Checks whether ImageMagick 7 is installed.

Returns:

  • (Boolean)


19
20
21
22
# File 'lib/mini_magick.rb', line 19

def self.imagemagick7?
  return @imagemagick7 if defined?(@imagemagick7)
  @imagemagick7 = !!MiniMagick::Utilities.which("magick")
end

.versionGem::Version

Returns:

  • (Gem::Version)


5
6
7
# File 'lib/mini_magick/version.rb', line 5

def self.version
  Gem::Version.new VERSION::STRING
end