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-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.3.1 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.3.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.2.1 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.2.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-retrospec-1.1.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-4.5.3 lib/puppet/parameter/boolean.rb
puppet-4.5.3-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.5.3-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.5.3-universal-darwin lib/puppet/parameter/boolean.rb
puppet-retrospec-1.0.0 vendor/gems/puppet-4.5.2/lib/puppet/parameter/boolean.rb
puppet-4.5.2 lib/puppet/parameter/boolean.rb
puppet-4.5.2-x86-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.5.2-x64-mingw32 lib/puppet/parameter/boolean.rb
puppet-4.5.2-universal-darwin lib/puppet/parameter/boolean.rb
puppet-4.5.1 lib/puppet/parameter/boolean.rb
puppet-4.5.1-x86-mingw32 lib/puppet/parameter/boolean.rb