class Hash

Public Instance Methods

compact() click to toggle source
# File lib/rottendesk/helpers/hash.rb, line 2
def compact
  select do |_, v|
    !v.nil?
  end
end
except(*keys) click to toggle source
# File lib/rottendesk/helpers/hash.rb, line 8
def except(*keys)
  dup.except!(*keys)
end
except!(*keys) click to toggle source
# File lib/rottendesk/helpers/hash.rb, line 12
def except!(*keys)
  keys.each { |key| delete(key) }
  self
end