module MiniMagick::Configuration
Attributes
Adds a prefix to the CLI command. For example, you could use ‘firejail` to run all commands in a sandbox. Can be a string, or an array of strings. e.g. ’firejail’, or [‘firejail’, ‘–force’]
@return [String] @return [Array<String>]
If set to ‘false`, it will not raise errors when ImageMagick returns status code different than 0. Defaults to `true`.
@return [Boolean]
Logger for commands, default is ‘Logger.new($stdout)`, but you can override it, for example if you want the logs to be written to a file.
@return [Logger]
If you don’t want commands to take too long, you can set a timeout (in seconds).
@return [Integer]
Temporary directory used by MiniMagick
, default is ‘Dir.tmpdir`, but you can override it.
@return [String]
If set to ‘false`, it will not forward warnings from ImageMagick to standard error.
Public Class Methods
# File lib/mini_magick/configuration.rb, line 53 def self.extended(base) base.tmpdir = Dir.tmpdir base.errors = true base.logger = Logger.new($stdout).tap { |l| l.level = Logger::INFO } base.warnings = true end
Public Instance Methods
@yield [self] @example
MiniMagick.configure do |config| config.timeout = 5 end
# File lib/mini_magick/configuration.rb, line 67 def configure yield self end