lib/image_processing/mini_magick.rb
# Converts the image on disk in various forms into a path.
Converts the image on disk in various forms into a path.
Converts the image on disk in various forms into a path .
def convert_to_path(file, name)
        if file.is_a?(String)
          file
        elsif file.respond_to?(:to_path)
          file.to_path
        elsif file.respond_to?(:path)
          file.path
        else
          raise ArgumentError, "#{name} must be a String, Pathname, or respond to #path"
        end
      end
def convert_to_path ( file , name ) if file . is_a? ( String ) file elsif file . respond_to? ( :to_path ) file . to_path elsif file . respond_to? ( :path ) file . path else raise ArgumentError , "#{name} must be a String, Pathname, or respond to #path" end end
Converts the image on disk in various forms into a path.
Converts the image on disk in various forms into a path .
file
name