Sha256: 771f4cbb111d4090e57c36c9a0610ff502ce53d731d742f84d4cc6824b111451
Contents?: true
Size: 1.6 KB
Versions: 28
Compression:
Stored size: 1.6 KB
Contents
{ "schema_type": "object", "schema_version": "1.0", "name": "except", "path": "packages/ree_hash/package/ree_hash/functions/except.rb", "mount_as": "fn", "class": "ReeHash::Except", "factory": null, "methods": [ { "doc": "Returns a hash that includes everything except given keys.\nYou can pass a symbol or a hash with array of symbols as a key.\nThe <tt>global_except:</tt> option excepts key in a hash recursively. \n\n hash = { a: true, b: false, c: nil, d: { e: 'e', f: 'f' }, f: 'f', setting: { id: 1, number: 1 } }\n except(hash, [:c]) # => { a: true, b: false, d: { e: 'e', f: 'f' }, f: 'f' , setting: { id: 1, number: 1 } }\n except(hash, [:a, :b]) # => { c: nil, d: { e: 'e', f: 'f'}, f: 'f', setting: { id: 1, number: 1 } }\n except(hash, [:a, :b, d: [:f]]) #=> { c: nil, d: { e: 'e' }, f: 'f', setting: { id: 1, number: 1 } }\n except(hash, [:a, :b, d: [:f], setting: [:id]] }) #=> { c: nil, d: { e: 'e' }, f: 'f', setting: { number: 1 } }\n except(hash, [:a], global_except: [:f]) #=> { b: false, c: nil, d: { e: 'e' }, setting: { id: 1, number: 1 } }", "throws": [ ], "return": "Hash", "args": [ { "arg": "hash", "type": "Hash" }, { "arg": "keys", "type": "[:key0, .., :keyM => [:keyN, .., :keyZ]]" }, { "arg": "opts", "type": "Ksplat[:global_except? => ArrayOf[Symbol]]" } ] } ], "links": [ { "target": "build_filter_keys", "package_name": "ree_hash", "as": "build_filter_keys", "imports": [ ] } ] }
Version data entries
28 entries across 28 versions & 1 rubygems