Module: Roda::RodaPlugins::BranchLocals::InstanceMethods

Defined in:
lib/roda/plugins/branch_locals.rb

Instance Method Summary collapse

Instance Method Details

#set_layout_locals(opts) ⇒ Object

Update the default layout locals to use in this branch.



32
33
34
35
36
37
38
# File 'lib/roda/plugins/branch_locals.rb', line 32

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.



41
42
43
44
45
46
47
# File 'lib/roda/plugins/branch_locals.rb', line 41

def set_view_locals(opts)
  if locals = @_view_locals
    @_view_locals = locals.merge(opts)
  else
    @_view_locals = opts
  end
end