Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/octoauth/auth.rb

Overview

Add .subset to Hash for selecting a subhash

Instance Method Summary collapse

Instance Method Details

#subset(*keys) ⇒ Object



118
119
120
# File 'lib/octoauth/auth.rb', line 118

def subset(*keys)
  select { |k| keys.include? k }
end