Class: RubyUI::Heading

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ui/typography/heading.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Constructor Details

#initialize(level: nil, as: nil, size: nil, **attrs) ⇒ Heading

Returns a new instance of Heading.



5
6
7
8
9
10
# File 'lib/ruby_ui/typography/heading.rb', line 5

def initialize(level: nil, as: nil, size: nil, **attrs)
  @level = level
  @as = as
  @size = size
  super(**attrs)
end

Instance Method Details

#view_templateObject



12
13
14
15
# File 'lib/ruby_ui/typography/heading.rb', line 12

def view_template(&)
  tag = determine_tag
  public_send(tag, **attrs, &)
end