new(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/template.rb, line 123
    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
Register or log in to add new notes.