lib/image_processing/mini_magick.rb
# Applies settings from the provided (nested) hash.
Applies settings from the provided (nested) hash.
Applies settings from the provided ( nested ) hash .
def apply_define(magick, options)
          options.each do |namespace, settings|
            namespace = namespace.to_s.tr("_", "-")
            settings.each do |key, value|
              key = key.to_s.tr("_", "-")
              magick.define "#{namespace}:#{key}=#{value}"
            end
          end
          magick
        end
def apply_define ( magick , options ) options . each do | namespace , settings | namespace = namespace . to_s . tr ( "_" , "-" ) settings . each do | key , value | key = key . to_s . tr ( "_" , "-" ) magick . define "#{namespace}:#{key}=#{value}" end end magick end
Applies settings from the provided (nested) hash.
Applies settings from the provided ( nested ) hash .
magick
options