Method: Puppet::Parser::Scope#include?
- Defined in:
- lib/puppet/parser/scope.rb
#include?(name) ⇒ Boolean
Returns true if the variable of the given name has a non nil value. TODO: This has vague semantics - does the variable exist or not?
use ['name'] to get nil or value, and if nil check with exist?('name')
this include? is only useful because of checking against the boolean value false.
272 273 274 275 276 277 |
# File 'lib/puppet/parser/scope.rb', line 272 def include?(name) catch(:undefined_variable) { return !self[name].nil? } false end |