Class: Courier::Models::ElementalImageNode
- Inherits:
-
ElementalBaseNode
- Object
- Internal::Type::BaseModel
- ElementalBaseNode
- Courier::Models::ElementalImageNode
- Defined in:
- lib/courier/models/elemental_image_node.rb,
sig/courier/models/elemental_image_node.rbs
Direct Known Subclasses
Instance Attribute Summary collapse
-
#align ⇒ Symbol, ...
The alignment of the image.
-
#alt_text ⇒ String?
Alternate text for the image.
-
#border_color ⇒ String?
CSS border color applied to the image.
-
#border_size ⇒ String?
CSS border width applied to the image.
-
#href ⇒ String?
A URL to link to when the image is clicked.
-
#padding ⇒ String?
CSS padding applied around the image.
-
#src ⇒ String
The source of the image.
-
#width ⇒ String?
CSS width properties to apply to the image.
Attributes inherited from ElementalBaseNode
Instance Method Summary collapse
-
#initialize(src:, align: nil, alt_text: nil, border_color: nil, border_size: nil, href: nil, padding: nil, width: nil) ⇒ Object
constructor
Used to embed an image into the notification.
- #to_hash ⇒ {
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:, align: nil, alt_text: nil, border_color: nil, border_size: nil, href: nil, padding: nil, width: nil) ⇒ Object
Used to embed an image into the notification.
|
|
# File 'lib/courier/models/elemental_image_node.rb', line 54
|
Instance Attribute Details
#align ⇒ Symbol, ...
The alignment of the image.
16 |
# File 'lib/courier/models/elemental_image_node.rb', line 16 optional :align, enum: -> { Courier::Alignment }, nil?: true |
#alt_text ⇒ String?
Alternate text for the image.
22 |
# File 'lib/courier/models/elemental_image_node.rb', line 22 optional :alt_text, String, nil?: true |
#border_color ⇒ String?
CSS border color applied to the image. For example, #ccc
28 |
# File 'lib/courier/models/elemental_image_node.rb', line 28 optional :border_color, String, nil?: true |
#border_size ⇒ String?
CSS border width applied to the image. For example, 1px
34 |
# File 'lib/courier/models/elemental_image_node.rb', line 34 optional :border_size, String, nil?: true |
#href ⇒ String?
A URL to link to when the image is clicked.
40 |
# File 'lib/courier/models/elemental_image_node.rb', line 40 optional :href, String, nil?: true |
#padding ⇒ String?
CSS padding applied around the image. For example, 10px
46 |
# File 'lib/courier/models/elemental_image_node.rb', line 46 optional :padding, String, nil?: true |
#src ⇒ String
The source of the image.
10 |
# File 'lib/courier/models/elemental_image_node.rb', line 10 required :src, String |
#width ⇒ String?
CSS width properties to apply to the image. For example, 50px
52 |
# File 'lib/courier/models/elemental_image_node.rb', line 52 optional :width, String, nil?: true |
Instance Method Details
#to_hash ⇒ {
59 |
# File 'sig/courier/models/elemental_image_node.rbs', line 59
def to_hash: -> {
|