Module: DynamicImage::Model::Validations::ClassMethods

Defined in:
lib/dynamic_image/model/validations.rb

Instance Method Summary collapse

Instance Method Details

#allowed_colorspacesArray<String>

Colorspaces an image is allowed to be in.

Returns:

  • (Array<String>)

    the colorspace names



64
65
66
# File 'lib/dynamic_image/model/validations.rb', line 64

def allowed_colorspaces
  %w[rgb cmyk gray]
end

#allowed_content_typesArray<String>

Content types an image is allowed to have, taken from the registered formats.

Returns:

  • (Array<String>)


71
72
73
# File 'lib/dynamic_image/model/validations.rb', line 71

def allowed_content_types
  DynamicImage::Format.content_types
end