Class: ENV

Inherits:
Object show all
Defined in:
lib/backports/1.9.1/env/key.rb

Class Method Summary collapse

Class Method Details

.except(*keys) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/backports/3.0.0/env/except.rb', line 2

def except(*keys)
  if keys.size > 4 && size > 4 # index if O(m*n) is big
    h = {}
    keys.each { |key| h[key] = true }
    keys = h
  end
  reject { |key, _value| keys.include? key}
end