Sha256: 9b00d1b776910173d69f9947705ccc0de13aa54accc3957f4d9831f8b99607ff

Contents?: true

Size: 335 Bytes

Versions: 14

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

# A simple wrapper of the ruby's group_by function.
Puppet::Functions.create_function(:'facts::group_by') do
  dispatch :native_group_by do
    param 'Iterable', :collection
    block_param
    return_type 'Hash'
  end

  def native_group_by(collection, &block)
    collection.group_by(&block)
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
vagrant-bolt-0.3.0 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
vagrant-bolt-0.2.1 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
vagrant-bolt-0.2.0 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
vagrant-bolt-0.1.2 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
vagrant-bolt-0.1.1 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
vagrant-bolt-0.1.0 acceptance/skeletons/base/modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.20.6 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.20.5 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.20.3 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.20.2 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.20.0 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.19.1 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.19.0 modules/facts/lib/puppet/functions/facts/group_by.rb
bolt-0.18.2 modules/facts/lib/puppet/functions/facts/group_by.rb