Class: ReeHash::Slice

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_hash/package/ree_hash/functions/slice.rb

Constant Summary collapse

MissingKeyErr =
Class.new(ArgumentError)
InvalidFilterKey =
Class.new(ArgumentError)

Instance Method Summary collapse

Instance Method Details

#call(hash, keys, **opts) ⇒ Object



30
31
32
33
# File 'lib/ree_lib/packages/ree_hash/package/ree_hash/functions/slice.rb', line 30

def call(hash, keys, **opts)
  filter_keys = build_filter_keys(keys)
  recursively_slice(hash, filter_keys, !!opts[:raise])
end