Sha256: 716f816348a5a7bc52e48e8ad26ec2eb1c65aead6633946bbf51de4786756966

Contents?: true

Size: 552 Bytes

Versions: 148

Compression:

Stored size: 552 Bytes

Contents

# Make iteration continue with the next value optionally given a value for this iteration.
# If a value is not given it defaults to `undef`
#
# @since 4.7.0
#
Puppet::Functions.create_function(:next) do
  dispatch :next_impl do
    optional_param 'Any', :value
  end

  def next_impl(value = nil)
    stacktrace = Puppet::Pops::PuppetStack.stacktrace()
    if stacktrace.size > 0
      file, line = stacktrace[0]
    else
      file = nil
      line = nil
    end

    exc = Puppet::Pops::Evaluator::Next.new(value, file, line)
    raise exc
  end
end

Version data entries

148 entries across 148 versions & 3 rubygems

Version Path
bolt-0.16.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.15.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.14.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.13.0 vendored/puppet/lib/puppet/functions/next.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/functions/next.rb
bolt-0.12.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.11.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.10.0 vendored/puppet/lib/puppet/functions/next.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/functions/next.rb
bolt-0.9.0 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.8.0 vendored/puppet/lib/puppet/functions/next.rb
puppet-4.10.9 lib/puppet/functions/next.rb
puppet-4.10.9-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.9-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.9-universal-darwin lib/puppet/functions/next.rb
puppet-5.3.3 lib/puppet/functions/next.rb
puppet-5.3.3-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.3.3-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.3.3-universal-darwin lib/puppet/functions/next.rb
bolt-0.7.0 vendored/puppet/lib/puppet/functions/next.rb