Class: Arclight::AccessComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/arclight/access_component.rb

Overview

Render access information for a document

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(presenter:) ⇒ AccessComponent

Returns a new instance of AccessComponent.



6
7
8
9
10
# File 'app/components/arclight/access_component.rb', line 6

def initialize(presenter:)
  super
  @show_config = presenter.configuration.show
  @presenter = presenter
end

Instance Attribute Details

#presenterObject (readonly)

Returns the value of attribute presenter.



12
13
14
# File 'app/components/arclight/access_component.rb', line 12

def presenter
  @presenter
end

#show_configObject (readonly)

Returns the value of attribute show_config.



12
13
14
# File 'app/components/arclight/access_component.rb', line 12

def show_config
  @show_config
end

Instance Method Details

#section_namesObject



17
18
19
20
21
# File 'app/components/arclight/access_component.rb', line 17

def section_names
  return Array(collection_access_items) if collection?

  Array(component_access_items)
end