Class: Bs5::Carousel::ItemComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ViewComponent::SlotableV2
Defined in:
app/components/bs5/carousel/item_component.rb

Constant Summary collapse

COMPONENT_OPTIONS =
%i[interval].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ItemComponent

Returns a new instance of ItemComponent.



15
16
17
18
# File 'app/components/bs5/carousel/item_component.rb', line 15

def initialize(options = {})
  @options = options.symbolize_keys
  extract_options
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



13
14
15
# File 'app/components/bs5/carousel/item_component.rb', line 13

def active
  @active
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/components/bs5/carousel/item_component.rb', line 20

def active?
  active
end