Method: Lotus::View::Configuration#root
- Defined in:
- lib/lotus/view/configuration.rb
#root(value) ⇒ Object #root ⇒ Pathname
Set the root path where to search for templates
If not set, this value defaults to the current directory.
This is part of a DSL, for this reason when this method is called with an argument, it will set the corresponding instance variable. When called without, it will return the already set value, or the default.
185 186 187 188 189 190 191 |
# File 'lib/lotus/view/configuration.rb', line 185 def root(value = nil) if value @root = Utils::Kernel.Pathname(value).realpath else @root end end |