Sha256: 2ba8d1b537f59ae099507e85c053eb82349fd5036ac2f724d81fb42394e31d48

Contents?: true

Size: 643 Bytes

Versions: 164

Compression:

Stored size: 643 Bytes

Contents

# Reverses the order of the elements of something that is iterable.
# (Documentation in 3.x stub)
#
# @since 4.4.0
#
Puppet::Functions.create_function(:reverse_each) do
  dispatch :reverse_each do
    param 'Iterable', :iterable
  end

  dispatch :reverse_each_block do
    param 'Iterable', :iterable
    block_param 'Callable[1,1]', :block
  end

  def reverse_each(iterable)
    # produces an Iterable
    Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable).reverse_each
  end

  def reverse_each_block(iterable, &block)
    Puppet::Pops::Types::Iterable.asserted_iterable(self, iterable).reverse_each(&block)
    nil
  end
end

Version data entries

164 entries across 164 versions & 3 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/functions/reverse_each.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/functions/reverse_each.rb
puppet-5.3.7 lib/puppet/functions/reverse_each.rb
puppet-5.3.7-x86-mingw32 lib/puppet/functions/reverse_each.rb
puppet-5.3.7-x64-mingw32 lib/puppet/functions/reverse_each.rb
puppet-5.3.7-universal-darwin lib/puppet/functions/reverse_each.rb
puppet-4.10.12 lib/puppet/functions/reverse_each.rb
puppet-4.10.12-x86-mingw32 lib/puppet/functions/reverse_each.rb
puppet-4.10.12-x64-mingw32 lib/puppet/functions/reverse_each.rb
puppet-4.10.12-universal-darwin lib/puppet/functions/reverse_each.rb
puppet-4.10.11 lib/puppet/functions/reverse_each.rb
puppet-4.10.11-x86-mingw32 lib/puppet/functions/reverse_each.rb
puppet-4.10.11-x64-mingw32 lib/puppet/functions/reverse_each.rb
puppet-4.10.11-universal-darwin lib/puppet/functions/reverse_each.rb
puppet-5.3.6 lib/puppet/functions/reverse_each.rb
puppet-5.3.6-x86-mingw32 lib/puppet/functions/reverse_each.rb
puppet-5.3.6-x64-mingw32 lib/puppet/functions/reverse_each.rb
puppet-5.3.6-universal-darwin lib/puppet/functions/reverse_each.rb
bolt-0.17.1 vendored/puppet/lib/puppet/functions/reverse_each.rb
bolt-0.17.0 vendored/puppet/lib/puppet/functions/reverse_each.rb