Class: Imagekitio::Models::ResponsiveImageAttributes
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::ResponsiveImageAttributes
- Defined in:
- lib/imagekitio/models/responsive_image_attributes.rb
Instance Attribute Summary collapse
-
#sizes ⇒ String?
‘sizes` returned (or synthesised as `100vw`).
-
#src ⇒ String
URL for the largest candidate (assigned to plain ‘src`).
-
#src_set ⇒ String?
Candidate set with ‘w` or `x` descriptors.
-
#width ⇒ Float?
Width as a number (if ‘width` was provided in the input options).
Instance Method Summary collapse
-
#initialize(src: , sizes: nil, src_set: nil, width: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see ResponsiveImageAttributes for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(src: , sizes: nil, src_set: nil, width: nil) ⇒ Object
Some parameter documentations has been truncated, see Imagekitio::Models::ResponsiveImageAttributes for more details.
Resulting set of attributes suitable for an HTML ‘<img>` element. Useful for enabling responsive image loading with `srcSet` and `sizes`.
|
|
# File 'lib/imagekitio/models/responsive_image_attributes.rb', line 32
|
Instance Attribute Details
#sizes ⇒ String?
‘sizes` returned (or synthesised as `100vw`). The value for the HTML `sizes` attribute.
17 |
# File 'lib/imagekitio/models/responsive_image_attributes.rb', line 17 optional :sizes, String |
#src ⇒ String
URL for the largest candidate (assigned to plain ‘src`).
10 |
# File 'lib/imagekitio/models/responsive_image_attributes.rb', line 10 required :src, String |
#src_set ⇒ String?
Candidate set with ‘w` or `x` descriptors. Multiple image URLs separated by commas, each with a descriptor.
24 |
# File 'lib/imagekitio/models/responsive_image_attributes.rb', line 24 optional :src_set, String, api_name: :srcSet |
#width ⇒ Float?
Width as a number (if ‘width` was provided in the input options).
30 |
# File 'lib/imagekitio/models/responsive_image_attributes.rb', line 30 optional :width, Float |