module ViewComponent::InlineTemplate
def method_missing(method, *args)
def method_missing(method, *args) return super if !method.end_with?("_template") if defined?(@__vc_inline_template_defined) && @__vc_inline_template_defined raise MultipleInlineTemplatesError end if args.size != 1 raise ArgumentError, "wrong number of arguments (given #{args.size}, expected 1)" end ext = method.to_s.gsub("_template", "") template = args.first @__vc_inline_template_language = ext caller = caller_locations(1..1)[0] @__vc_inline_template = Template.new( template, ext, caller.absolute_path || caller.path, caller.lineno ) @__vc_inline_template_defined = true end