Module: HashPivot::Repository::Base::ClassMethods

Defined in:
lib/hash_pivot/repository/base.rb

Instance Method Summary collapse

Instance Method Details

#hash_by_group(data, group, pivot_in) ⇒ Hash

Parameters:

  • data (Array<Hash>, ActiveRecord::Relation)
  • group (Array)
  • pivot_in (Object)

Returns:

  • (Hash)


15
16
17
# File 'lib/hash_pivot/repository/base.rb', line 15

def hash_by_group(data, group, pivot_in)
  new(data, group, pivot_in).hash_by_group
end