Class: Tipsy::View::Path
- Inherits:
-
Hike::Trail
- Object
- Hike::Trail
- Tipsy::View::Path
- Defined in:
- lib/tipsy/view/path.rb
Instance Method Summary collapse
- #full_path ⇒ Object
-
#initialize ⇒ Path
constructor
A new instance of Path.
- #locate_layout(name) ⇒ Object
- #locate_relative(path, name) ⇒ Object
- #locate_template(view_path) ⇒ Object
Constructor Details
Instance Method Details
#full_path ⇒ Object
31 32 33 |
# File 'lib/tipsy/view/path.rb', line 31 def full_path @_template end |
#locate_layout(name) ⇒ Object
19 20 21 22 23 |
# File 'lib/tipsy/view/path.rb', line 19 def locate_layout(name) with_temporary_scope('layouts') do @_layout ||= find(name) end end |
#locate_relative(path, name) ⇒ Object
25 26 27 28 29 |
# File 'lib/tipsy/view/path.rb', line 25 def locate_relative(path, name) with_temporary_scope("views", path) do find(name) end end |
#locate_template(view_path) ⇒ Object
13 14 15 16 17 |
# File 'lib/tipsy/view/path.rb', line 13 def locate_template(view_path) with_temporary_scope('views') do @_template ||= (find(view_path) || find(File.join(view_path, "index"))) end end |