Class: Gitil::Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/gitdb/util.rb

Instance Method Summary collapse

Instance Method Details

#sub_hash(*args) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/gitdb/util.rb', line 16

def sub_hash *args
  tmp = {}
  args.each do |k|
    tmp[k] = self[k] if self.has_key? k
  end
  tmp
end