Sha256: bcf0434f9217b5a54f24ffeb10a9e8c87b32cdf8583d4f815821a30dfc723c91

Contents?: true

Size: 495 Bytes

Versions: 49

Compression:

Stored size: 495 Bytes

Contents

#
# is_true.rb
#
# Checks whether a given string or boolean value is true.
#
module Puppet::Parser::Functions
  newfunction(:is_true, :type => :rvalue, :doc => <<-EOS
This function checks whether a given value is true.
    EOS
) do |args|
    
    value = nil
    CORL.run do
      raise(Puppet::ParseError, "is_true(): Must have a value to check; " +
        "given (#{args.size} for 1)") if args.size < 1
      
      value = CORL::Util::Data.true?(args[0])
    end
    return value
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
corl-0.5.18 lib/puppet/parser/functions/is_true.rb
corl-0.5.17 lib/puppet/parser/functions/is_true.rb
corl-0.5.16 lib/puppet/parser/functions/is_true.rb
corl-0.5.15 lib/puppet/parser/functions/is_true.rb
corl-0.5.14 lib/puppet/parser/functions/is_true.rb
corl-0.5.13 lib/puppet/parser/functions/is_true.rb
corl-0.5.12 lib/puppet/parser/functions/is_true.rb
corl-0.5.11 lib/puppet/parser/functions/is_true.rb
corl-0.5.10 lib/puppet/parser/functions/is_true.rb
corl-0.5.9 lib/puppet/parser/functions/is_true.rb
corl-0.5.8 lib/puppet/parser/functions/is_true.rb
corl-0.5.7 lib/puppet/parser/functions/is_true.rb
corl-0.5.6 lib/puppet/parser/functions/is_true.rb
corl-0.5.5 lib/puppet/parser/functions/is_true.rb
corl-0.5.4 lib/puppet/parser/functions/is_true.rb
corl-0.5.3 lib/puppet/parser/functions/is_true.rb
corl-0.5.2 lib/puppet/parser/functions/is_true.rb
corl-0.5.1 lib/puppet/parser/functions/is_true.rb
corl-0.5.0 lib/puppet/parser/functions/is_true.rb
corl-0.4.29 lib/puppet/parser/functions/is_true.rb