Module: Flagsmith::HashSlice

Defined in:
lib/flagsmith/hash_slice.rb

Overview

Hash#slice was added in ruby version 2.5

Instance Method Summary collapse

Instance Method Details

#slice(*keys) ⇒ Object



6
7
8
# File 'lib/flagsmith/hash_slice.rb', line 6

def slice(*keys)
  select { |key, _value| keys.include?(key) }
end