Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/netlinx/erb/helpers.rb
Overview
:nodoc:
Other collapse
-
#remap(nested_key) ⇒ Hash
Reconstructs a single level hash out of a hash with nested parameters.
Instance Method Details
#remap(nested_key) ⇒ Hash
Reconstructs a single level hash out of a hash with nested parameters.
347 348 349 |
# File 'lib/netlinx/erb/helpers.rb', line 347 def remap nested_key self.map { |k,v| [k, v[nested_key]] }.to_h end |