Class: Ui::Separator::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Separator::Component
- Defined in:
- lib/uikit_rails/templates/components/separator/component.rb
Overview
Visual divider between content sections.
Instance Attribute Summary collapse
-
#decorative ⇒ Object
readonly
Returns the value of attribute decorative.
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
-
#orientation ⇒ Object
readonly
Returns the value of attribute orientation.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(orientation: :horizontal, decorative: false, **html_attrs) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(orientation: :horizontal, decorative: false, **html_attrs) ⇒ Component
Returns a new instance of Component.
9 10 11 12 13 14 |
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 9 def initialize(orientation: :horizontal, decorative: false, **html_attrs) @orientation = orientation.to_sym @decorative = decorative @html_attrs = html_attrs super() end |
Instance Attribute Details
#decorative ⇒ Object (readonly)
Returns the value of attribute decorative.
7 8 9 |
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 7 def decorative @decorative end |
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
7 8 9 |
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 7 def html_attrs @html_attrs end |
#orientation ⇒ Object (readonly)
Returns the value of attribute orientation.
7 8 9 |
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 7 def orientation @orientation end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 16 def call tag.div(**computed_attrs) end |