Sha256: 91d5de9ef1c025100264800e755127156c2cb10d9883c8e92af4775b4a62827f

Contents?: true

Size: 396 Bytes

Versions: 142

Compression:

Stored size: 396 Bytes

Contents

require 'puppet/coercion'

# This specialized {Puppet::Parameter} handles boolean options, accepting lots
# of strings and symbols for both truthiness and falsehood.
#
class Puppet::Parameter::Boolean < Puppet::Parameter
  def unsafe_munge(value)
    Puppet::Coercion.boolean(value)
  end

  def self.initvars
    super
    @value_collection.newvalues(*Puppet::Coercion.boolean_values)
  end
end

Version data entries

142 entries across 142 versions & 2 rubygems

Version Path
puppet-3.8.4-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-3.8.4-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.2.3 lib/puppet/parameter/boolean.rb
puppet-4.2.3-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.2.3-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-3.8.3 lib/puppet/parameter/boolean.rb
puppet-3.8.3-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-3.8.3-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.2.2 lib/puppet/parameter/boolean.rb
puppet-4.2.2-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.2.2-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-retrospec-0.8.0 vendor/gems/puppet-3.7.3/lib/puppet/parameter/boolean.rb
puppet-3.8.2 lib/puppet/parameter/boolean.rb
puppet-3.8.2-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-3.8.2-x64-mingw32 lib/puppet/parameter/boolean.rb