module Roda::RodaPlugins::BranchLocals::InstanceMethods

  1. lib/roda/plugins/branch_locals.rb

Methods

Public Instance

  1. set_layout_locals
  2. set_view_locals

Public Instance methods

set_layout_locals(opts)

Update the default layout locals to use in this branch.

[show source]
   # File lib/roda/plugins/branch_locals.rb
32 def set_layout_locals(opts)
33   if locals = @_layout_locals
34     @_layout_locals = locals.merge(opts)
35   else
36     @_layout_locals = opts
37   end
38 end
set_view_locals(opts)

Update the default view locals to use in this branch.

[show source]
   # File lib/roda/plugins/branch_locals.rb
41 def set_view_locals(opts)
42   if locals = @_view_locals
43     @_view_locals = locals.merge(opts)
44   else
45     @_view_locals = opts
46   end
47 end