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.4 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.16.3 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.16.2 vendored/puppet/lib/puppet/functions/next.rb
puppet-5.4.0 lib/puppet/functions/next.rb
puppet-5.4.0-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.4.0-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.4.0-universal-darwin lib/puppet/functions/next.rb
puppet-5.3.5 lib/puppet/functions/next.rb
puppet-5.3.5-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.3.5-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.3.5-universal-darwin lib/puppet/functions/next.rb
bolt-0.16.1 vendored/puppet/lib/puppet/functions/next.rb
puppet-5.3.4 lib/puppet/functions/next.rb
puppet-5.3.4-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.3.4-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.3.4-universal-darwin lib/puppet/functions/next.rb
puppet-4.10.10 lib/puppet/functions/next.rb
puppet-4.10.10-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.10-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.10-universal-darwin lib/puppet/functions/next.rb