method
new
new(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil)
public
Hide source
# File actionview/lib/action_view/template.rb, line 120 def initialize(source, identifier, handler, locals,, format: nil, variant: nil, virtual_path: nil) @source = source @identifier = identifier @handler = handler @compiled = false @locals = locals @virtual_path = virtual_path @variable = if @virtual_path base = @virtual_path.end_with?("/") ? "" : ::File.basename(@virtual_path) base =~ /\A_?(.*?)(?:\.\w+)*\z/ $1.to_sym end @format = format @variant = variant @compile_mutex = Mutex.new end