vendor/bundle/ruby/2.3.0/gems/tilt-2.0.8/lib/tilt/mapping.rb
# Instantiates a new template class based on the file.
#
# @raise [RuntimeError] if there is no template class registered for the
#   file name.
#
# @example
#   mapping.new('index.mt') # => instance of MyEngine::Template
#
# @see Tilt::Template.new
Instantiates a new template class based on the file.
Instantiates a new template class based on the file .
def new(file, line=nil, options={}, &block)
      if template_class = self[file]
        template_class.new(file, line, options, &block)
      else
        fail "No template engine registered for #{File.basename(file)}"
      end
    end
def new ( file , line = nil , options = { } , & block ) if template_class = self [ file ] template_class . new ( file , line , options , & block ) else fail "No template engine registered for #{File.basename(file)}" end end
Instantiates a new template class based on the file.
Instantiates a new template class based on the file .
[RuntimeError] if there is no template class registered for the file name.
[ RuntimeError ] if there is no template class registered for the file name .
file
<not_specific>
line
<not_specific>
options
<not_specific>
block
<not_specific>
example
mapping.new('index.mt') # => instance of MyEngine::Template
mapping . new ( ' index . mt ' ) # = > instance of MyEngine :: Template
see
None