class ViewComponent::Template
def initialize(
def initialize( component:, type:, this_format: nil, variant: nil, lineno: nil, path: nil, extension: nil, source: nil, method_name: nil, defined_on_self: true ) @component = component @type = type @this_format = this_format @variant = variant&.to_sym @lineno = lineno @path = path @extension = extension @source = source @method_name = method_name @defined_on_self = defined_on_self @source_originally_nil = @source.nil? @call_method_name = if @method_name @method_name else out = +"call" out << "_#{normalized_variant_name}" if @variant.present? out << "_#{@this_format}" if @this_format.present? && @this_format != ViewComponent::Base::VC_INTERNAL_DEFAULT_FORMAT out end end