Class: Warped::Emails::Align
- Defined in:
- lib/warped/emails/components/align.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(align: :left) ⇒ Align
constructor
A new instance of Align.
- #template ⇒ Object
Methods inherited from Base
#content, #helpers, #render_in
Methods included from Styleable
#base_styles, #default_variants, included, #style, #variants
Methods included from Slottable
Constructor Details
#initialize(align: :left) ⇒ Align
Returns a new instance of Align.
10 11 12 13 14 |
# File 'lib/warped/emails/components/align.rb', line 10 def initialize(align: :left) super() @align = align raise ArgumentError, "Invalid alignment: #{align}" unless %i[left center right].include?(align) end |
Instance Method Details
#template ⇒ Object
16 17 18 |
# File 'lib/warped/emails/components/align.rb', line 16 def template tag.div(content, style:) end |