Method: Puppet::Context::EmptyStack#lookup
- Defined in:
- lib/puppet/context.rb
#lookup(name, &block) ⇒ 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.
Lookup a binding. Since there are none in EmptyStack, this always raises an exception unless a block is passed, in which case the block is called and its return value is used.
107 108 109 110 111 112 113 |
# File 'lib/puppet/context.rb', line 107 def lookup(name, &block) if block block.call else raise UndefinedBindingError, _("Unable to lookup '%{name}'") % { name: name } end end |