Module: Roda::RodaPlugins::BranchLocals::InstanceMethods
- Defined in:
- lib/roda/plugins/branch_locals.rb
Instance Method Summary collapse
-
#set_layout_locals(opts) ⇒ Object
Update the default layout locals to use in this branch.
-
#set_view_locals(opts) ⇒ Object
Update the default view locals to use in this branch.
Instance Method Details
#set_layout_locals(opts) ⇒ Object
Update the default layout locals to use in this branch.
34 35 36 37 38 39 40 |
# File 'lib/roda/plugins/branch_locals.rb', line 34 def set_layout_locals(opts) if locals = @_layout_locals @_layout_locals = locals.merge(opts) else @_layout_locals = opts end end |
#set_view_locals(opts) ⇒ Object
Update the default view locals to use in this branch.
43 44 45 46 47 48 49 |
# File 'lib/roda/plugins/branch_locals.rb', line 43 def set_view_locals(opts) if locals = @_view_locals @_view_locals = locals.merge(opts) else @_view_locals = opts end end |