Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/xrbp/core_ext.rb

Overview

Extend Hash class w/ some methods pulled from activesupport

Instance Method Summary collapse

Instance Method Details

#except(*keys) ⇒ Object



4
5
6
# File 'lib/xrbp/core_ext.rb', line 4

def except(*keys)
  dup.except!(*keys)
end

#except!(*keys) ⇒ Object



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

def except!(*keys)
  keys.each { |key| delete(key) }
  self
end