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.



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

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

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

Instance Method Details

#callObject



23
24
25
# File 'app/components/koi/header_component.rb', line 23

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