module Spellr::HashSlice
Public Instance Methods
slice(*keys)
click to toggle source
# File lib/spellr/backports.rb, line 12 def slice(*keys) dup.slice!(*keys) end
slice!(*keys)
click to toggle source
# File lib/spellr/backports.rb, line 8 def slice!(*keys) delete_if { |k| !keys.include?(k) } end