Module | Ramaze::Helper::Layout::SingletonMethods |
In: |
lib/ramaze/helper/layout.rb
|
The set_layout method allows you to specify a number of methods and their layout. This allows you to use layout A for methods 1, 2 and 3 but layout B for method 4.
@example
# The key is the layout, the value an array of methods set_layout 'default' => [:method_1], 'alternative' => [:method_2] # We can combine this method with layout() layout 'default' set_layout 'alternative' => [:method_1] # This is also perfectly fine set_layout 'default'
@param [String, Symbol, to_hash] hash_or_layout
In case it's a String or Symbol it will directly be used as the layout. When setting a Hash this hash should have it's keys set to the layouts and it's values to an array of methods that use the specific layout. For more information see the examples.
@author Yorick Peterse @author Michael Fellinger @author Pistos @since 2011-04-07