Class: Ui::Separator::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/separator/component.rb

Overview

Visual divider between content sections.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#decorativeObject (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_attrsObject (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

#orientationObject (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

#callObject



16
17
18
# File 'lib/uikit_rails/templates/components/separator/component.rb', line 16

def call
  tag.div(**computed_attrs)
end