static public Method

Template.new(view, path_or_source, use_full_path, locals = {}, inline = false, inline_type = nil)

There's no documentation for this item.

Source Code

# File action_view/template.rb, line 7
def initialize(view, path_or_source, use_full_path, locals = {}, inline = false, inline_type = nil)
  @view = view
  @finder = @view.finder

  unless inline
    # Clear the forward slash at the beginning if exists
    @path = use_full_path ? path_or_source.sub(/^\//, '') : path_or_source
    @view.first_render ||= @path
    @source = nil # Don't read the source until we know that it is required
    set_extension_and_file_name(use_full_path)
  else
    @source = path_or_source
    @extension = inline_type
  end
  @locals = locals || {}
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.