lib/hm.rb
def except(*pathes)
    pathes.each do |path|
      Algo.visit(@hash, path) { |what, pth, _| Algo.delete(what, pth.last) }
    end
    self
  end
# Removes all specified pathes from input sequence.
#
# @example
#   order = {items: [{title: "Beef", price: 18.0}, {title: "Potato", price: 8.2}], total: 26.2}
#   Hm(order).except(%i[items * title]).to_h
#   # => {:items=>[{:price=>18.0}, {:price=>8.2}], :total=>26.2}
#   Hm(order).except([:items, 0, :title], :total).to_h
#   # => {:items=>[{:price=>18.0}, {:title=>"Potato", :price=>8.2}]}
#
# @see #slice
# @param pathes [Array] List of pathes (each being singular key, or array of keys, including
#   `:*` wildcard) to look at.
# @return [self]
Removes all specified pathes from input sequence.
Removes all specified pathes from input sequence .
def except(*pathes)
    pathes.each do |path|
      Algo.visit(@hash, path) { |what, pth, _| Algo.delete(what, pth.last) }
    end
    self
  end
def except ( * pathes ) pathes . each do | path | Algo . visit ( @hash , path ) { | what , pth , _ | Algo . delete ( what , pth . last ) } end self end
Removes all specified pathes from input sequence.
Removes all specified pathes from input sequence .
None
self
pathes
List of pathes (each being singular key, or array of keys, including `:*` wildcard) to look at.
List of pathes ( each being singular key or array of keys including ` : * ` wildcard ) to look at .
example
None
see
None