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 186 def initialize(source, identifier, handler, locals,, format: nil, variant: nil, virtual_path: nil) @source = source.dup @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 @strict_locals = NONE @strict_local_keys = nil @type = nil end