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-retrospec-1.8.0 vendor/pup410/lib/puppet/functions/next.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/functions/next.rb
puppet-5.3.7 lib/puppet/functions/next.rb
puppet-5.3.7-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.3.7-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.3.7-universal-darwin lib/puppet/functions/next.rb
puppet-4.10.12 lib/puppet/functions/next.rb
puppet-4.10.12-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.12-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.12-universal-darwin lib/puppet/functions/next.rb
puppet-4.10.11 lib/puppet/functions/next.rb
puppet-4.10.11-x86-mingw32 lib/puppet/functions/next.rb
puppet-4.10.11-x64-mingw32 lib/puppet/functions/next.rb
puppet-4.10.11-universal-darwin lib/puppet/functions/next.rb
puppet-5.3.6 lib/puppet/functions/next.rb
puppet-5.3.6-x86-mingw32 lib/puppet/functions/next.rb
puppet-5.3.6-x64-mingw32 lib/puppet/functions/next.rb
puppet-5.3.6-universal-darwin lib/puppet/functions/next.rb
bolt-0.17.1 vendored/puppet/lib/puppet/functions/next.rb
bolt-0.17.0 vendored/puppet/lib/puppet/functions/next.rb