Class: Anchor::PanelComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/panel_component.rb

Instance Method Summary collapse

Methods inherited from Component

generate_id

Methods included from ViewHelper

#text_prose

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(active: false) ⇒ PanelComponent

Returns a new instance of PanelComponent.



10
11
12
13
14
# File 'app/components/anchor/panel_component.rb', line 10

def initialize(active: false)
  @active = active

  super
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/components/anchor/panel_component.rb', line 16

def active?
  @active == true
end