Methods
Attributes
[R] path
[R] paths
Public Class methods
new(path)
    # File actionpack/lib/action_view/template.rb, line 7
 7:       def initialize(path)
 8:         raise ArgumentError, "path already is a Path class" if path.is_a?(Path)
 9:         @path = (path.ends_with?(File::SEPARATOR) ? path.to(-2) : path).freeze
10:       end
new_and_loaded(path)
    # File actionpack/lib/action_view/template.rb, line 47
47:       def self.new_and_loaded(path)
48:         returning new(path) do |path|
49:           path.load!
50:         end
51:       end
Public Instance methods
==(path)
    # File actionpack/lib/action_view/template.rb, line 24
24:       def ==(path)
25:         to_str == path.to_str
26:       end
[](path)

Returns a ActionView::Template object for the given path string. The input path should be relative to the view path directory, +hello/index.html.erb+. This method also has a special exception to match partial file names without a handler extension. So +hello/index.html+ will match the first template it finds with a known template extension, +hello/index.html.erb+. Template extensions should not be confused with format extensions html, js, xml, etc. A format must be supplied to match a formated file. +hello/index+ will never match +hello/index.html.erb+.

    # File actionpack/lib/action_view/template.rb, line 41
41:       def [](path)
42:       end
eql?(path)
    # File actionpack/lib/action_view/template.rb, line 28
28:       def eql?(path)
29:         to_str == path.to_str
30:       end
load!()
    # File actionpack/lib/action_view/template.rb, line 44
44:       def load!
45:       end
to_s()
    # File actionpack/lib/action_view/template.rb, line 12
12:       def to_s
13:         if defined?(RAILS_ROOT)
14:           path.to_s.sub(/^#{Regexp.escape(File.expand_path(RAILS_ROOT))}\//, '')
15:         else
16:           path.to_s
17:         end
18:       end
to_str()
    # File actionpack/lib/action_view/template.rb, line 20
20:       def to_str
21:         path.to_str
22:       end