Module: NForm::Hashable

Included in:
Service
Defined in:
lib/nform/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#hash_of(*keys) ⇒ Object

A convenience method for making a hash with the given methods on self as the keys and return for the given methods as the values



8
9
10
# File 'lib/nform/core_ext.rb', line 8

def hash_of(*keys)
  keys.each.with_object({}){|k,h| h[k] = send(k) }
end