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
puppet-4.10.7 lib/puppet/functions/next.rb
puppet-4.10.7-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.7-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.7-universal-darwin lib/puppet/functions/next.rb
puppet-5.1.0 lib/puppet/functions/next.rb
puppet-5.1.0-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.1.0-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.1.0-universal-darwin lib/puppet/functions/next.rb
puppet-4.10.6 lib/puppet/functions/next.rb
puppet-4.10.6-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.6-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.6-universal-darwin lib/puppet/functions/next.rb
puppet-4.10.5 lib/puppet/functions/next.rb
puppet-4.10.5-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.5-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.5-universal-darwin lib/puppet/functions/next.rb
puppet-5.0.1 lib/puppet/functions/next.rb
puppet-5.0.1-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.0.1-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.0.1-universal-darwin lib/puppet/functions/next.rb