Class: Koi::HeaderComponent::LinkComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/koi/header_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, path, **options) ⇒ LinkComponent

Returns a new instance of LinkComponent.



17
18
19
20
21
22
23
# File 'app/components/koi/header_component.rb', line 17

def initialize(name, path, **options)
  super()

  @name    = name
  @path    = path
  @options = options
end

Instance Method Details

#callObject



25
26
27
# File 'app/components/koi/header_component.rb', line 25

def call
  link_to @name, @path, **@options
end