class Variation
Ruby on Rails 8.0.4
Since v5.2.8.1Active Storage Variation
A set of transformations that can be applied to a blob to create a variant. This class is exposed via the ActiveStorage::Blob#variant method and should rarely be used directly.
In case you do need to use this directly, it’s instantiated using a hash of transformations where the key is the command and the value is the arguments. Example:
ActiveStorage::Variation.new(resize_to_limit: [100, 100], colourspace: "b-w", rotate: "-90", saver: { trim: true })
The options map directly to ImageProcessing commands.
Inherits from
Attributes
Methods (defined here)
- # content_type
- # default_to
- # digest
- # format
- # key
- # transform
- self. decode
- self. encode
- self. new
- self. wrap
Private methods
(1)
Implementation detail — not part of the public API.
Methods (inherited)
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::NumericWithFormat (2)
- # to_formatted_s
- # to_fs