Class: Railsboot::BaseComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/railsboot/base_component.rb

Overview

ViewComponent: renders the base block.

Instance Method Summary collapse

Constructor Details

#initialize(tag:, **html_attributes) ⇒ BaseComponent

Returns a new instance of BaseComponent.



4
5
6
7
# File 'app/components/railsboot/base_component.rb', line 4

def initialize(tag:, **html_attributes)
  @tag = tag
  @html_attributes = html_attributes
end

Instance Method Details

#callObject



9
10
11
12
13
# File 'app/components/railsboot/base_component.rb', line 9

def call
  (@tag, **@html_attributes) do
    content
  end
end