Class: Arclight::AccessComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Arclight::AccessComponent
- Defined in:
- app/components/arclight/access_component.rb
Overview
Render access information for a document
Instance Attribute Summary collapse
-
#presenter ⇒ Object
readonly
Returns the value of attribute presenter.
-
#show_config ⇒ Object
readonly
Returns the value of attribute show_config.
Instance Method Summary collapse
-
#initialize(presenter:) ⇒ AccessComponent
constructor
A new instance of AccessComponent.
- #section_names ⇒ Object
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
#presenter ⇒ Object (readonly)
Returns the value of attribute presenter.
12 13 14 |
# File 'app/components/arclight/access_component.rb', line 12 def presenter @presenter end |
#show_config ⇒ Object (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_names ⇒ Object
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 |