Method: Lotus::View::Configuration#layout
- Defined in:
- lib/lotus/view/configuration.rb
#layout(value) ⇒ Object #layout ⇒ Class
Set the global layout
If not set, this value defaults to ‘nil`, while at the rendering time it will use `Lotus::View::Rendering::NullLayout`.
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.
238 239 240 241 242 243 244 |
# File 'lib/lotus/view/configuration.rb', line 238 def layout(value = nil) if value.nil? Rendering::LayoutFinder.find(@layout, @namespace) else @layout = value end end |