sul-dlss/argo

View on GitHub
app/components/document_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

class DocumentComponent < Blacklight::DocumentComponent
  def initialize(document: nil, **kwargs)
    super
  end

  def child_component
    type = @document.object_type
    "Show::#{type.classify}Component".constantize.new(presenter: @presenter)
  end
end