Class: Courier::Models::ElementalHTMLNode

Inherits:
ElementalBaseNode show all
Defined in:
lib/courier/models/elemental_html_node.rb,
sig/courier/models/elemental_html_node.rbs

Direct Known Subclasses

ElementalHTMLNodeWithType

Instance Attribute Summary collapse

Attributes inherited from ElementalBaseNode

#channels, #if_, #loop_, #ref

Instance Method Summary collapse

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(content:, locales: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::ElementalHTMLNode for more details.

Raw HTML string inside an Elemental document. When rendering a message, this node is turned into output only for the email channel; for other channels it produces no blocks.

Parameters:



# File 'lib/courier/models/elemental_html_node.rb', line 20

Instance Attribute Details

#contentString

Raw HTML string to render inside the notification.

Parameters:

  • _ (String)

Returns:

  • (String)


10
# File 'lib/courier/models/elemental_html_node.rb', line 10

required :content, String

#localesHash{Symbol=>Courier::Models::LocaleItem}?

Region specific content. See locales docs for more details.

Parameters:

  • _ (Courier::Models::locales, nil)

Returns:



18
# File 'lib/courier/models/elemental_html_node.rb', line 18

optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true

Instance Method Details

#to_hash{ content: String, locales: Courier::Models::locales? }

Returns:

  • ({ content: String, locales: Courier::Models::locales? })


20
# File 'sig/courier/models/elemental_html_node.rbs', line 20

def to_hash: -> { content: String, locales: Courier::Models::locales? }