Module: Wayfarer::Locals::ClassMethods Private

Defined in:
lib/wayfarer/locals.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#localsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


24
25
26
# File 'lib/wayfarer/locals.rb', line 24

def locals
  @locals
end

Instance Method Details

#let(key) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


26
27
28
29
# File 'lib/wayfarer/locals.rb', line 26

def let(key)
  raise "#let called without a block" unless block_given?
  locals[key] = yield
end