thedrummeraki/tanoshimu

View on GitHub
app/components/show_card_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class ShowCardComponent < ViewComponent::Base
  attr_reader :show, :platform

  def initialize(show, platform: nil, link: false)
    @show = show
    @platform = platform
    @link = link

    super
  end

  def internal_container
    if @link
      link_to(show) do
        yield
      end
    else
      yield
    end
  end
end