Module: PuppetX::Util::Boolean
- Extended by:
- Ontology
- Includes:
- Ontology
- Included in:
- Puppet::Parameter::Boolean, Puppet::Property::Boolean
- Defined in:
- lib/puppet_x/util/boolean.rb
Defined Under Namespace
Modules: Ontology
Class Method Summary collapse
Methods included from Ontology
false_values, munge, true_values
Class Method Details
.defaultvalues ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/puppet_x/util/boolean.rb', line 39 def self.defaultvalues newvalue(true) newvalue(false) aliasvalue(:true, true) aliasvalue(:false, false) aliasvalue('true', true) aliasvalue('false', false) aliasvalue(:yes, true) aliasvalue(:no, false) aliasvalue('yes', true) aliasvalue('no', false) # Ensure provided values are reasonable by trying to munge them, and if that # fails then let munge throw the exception and propagate that up. validate do |value| munge(value) end end |