Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/umount-many.rb
Instance Method Summary collapse
-
#hash_at(*keys) ⇒ Object
Works similiar to the
values_at
method but return instead of just values an appropriate hash.
Instance Method Details
#hash_at(*keys) ⇒ Object
Works similiar to the values_at
method but return instead of just values an appropriate hash
18 19 20 21 22 |
# File 'lib/umount-many.rb', line 18 def hash_at(*keys) hash = Hash.new keys.zip(self.values_at(*keys)).each {|k, v| hash[k] = v} hash end |