Class: LeanCms::BaseComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- LeanCms::BaseComponent
- Defined in:
- app/components/lean_cms/base_component.rb
Direct Known Subclasses
BulletsSectionComponent, CardsSectionComponent, EditableContentComponent, SectionComponent
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(page: nil, **options) ⇒ BaseComponent
constructor
A new instance of BaseComponent.
Constructor Details
#initialize(page: nil, **options) ⇒ BaseComponent
Returns a new instance of BaseComponent.
5 6 7 8 |
# File 'app/components/lean_cms/base_component.rb', line 5 def initialize(page: nil, **) @page = page || @view_context.instance_variable_get(:@page) super(**) end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
3 4 5 |
# File 'app/components/lean_cms/base_component.rb', line 3 def page @page end |