Class: Spina::Parts::ImageVariant
- Inherits:
-
Object
- Object
- Spina::Parts::ImageVariant
- Defined in:
- app/models/spina/parts/image_variant.rb
Defined Under Namespace
Classes: ImageVariation
Instance Attribute Summary collapse
-
#blob ⇒ Object
readonly
Returns the value of attribute blob.
Instance Method Summary collapse
-
#initialize(image, options) ⇒ ImageVariant
constructor
A new instance of ImageVariant.
- #variation ⇒ Object
Constructor Details
#initialize(image, options) ⇒ ImageVariant
Returns a new instance of ImageVariant.
8 9 10 11 |
# File 'app/models/spina/parts/image_variant.rb', line 8 def initialize(image, ) @blob = image @options = end |
Instance Attribute Details
#blob ⇒ Object (readonly)
Returns the value of attribute blob.
6 7 8 |
# File 'app/models/spina/parts/image_variant.rb', line 6 def blob @blob end |
Instance Method Details
#variation ⇒ Object
13 14 15 |
# File 'app/models/spina/parts/image_variant.rb', line 13 def variation ImageVariation.new(ActiveStorage::Variation.encode(@options)) end |