Class: Hash

Inherits:
Object show all
Defined in:
lib/has_many_polymorphs/support_methods.rb

Instance Method Summary collapse

Instance Method Details

#_selectObject

An implementation of select that returns a Hash.



47
48
49
50
51
# File 'lib/has_many_polymorphs/support_methods.rb', line 47

def _select
  Hash[*self.select do |key, value|
    yield key, value
  end._flatten_once]
end