Sha256: 3616a78388272d259e5fd7e1bd0febfe15ad4565f3a6a783c7c985d249035066

Contents?: true

Size: 1.07 KB

Versions: 28

Compression:

Stored size: 1.07 KB

Contents

{
  "schema_type": "object",
  "schema_version": "1.0",
  "name": "slice",
  "path": "packages/ree_hash/package/ree_hash/functions/slice.rb",
  "mount_as": "fn",
  "class": "ReeHash::Slice",
  "factory": null,
  "methods": [
    {
      "doc": "Replaces the hash with only the given keys.\nReturns a hash containing the removed key/value pairs.\n\n  hash = { a: 1, b: {e: 2, f: 1}, c: 3, d: 4 }\n  slice(hash, [:a, :b])  # => {a: 1, b: 2}\n  slice(hash, [:a, b: [:e]])  # => {a: 1, b: {e: 2}}",
      "throws": [
        "ReeHash::Slice::MissingKeyErr",
        "ReeHash::Slice::InvalidFilterKey"
      ],
      "return": "Hash",
      "args": [
        {
          "arg": "hash",
          "type": "Hash"
        },
        {
          "arg": "keys",
          "type": "[:key0, .., :keyM => [:keyN, .., :keyZ]]"
        },
        {
          "arg": "opts",
          "type": "Ksplat[:raise? => Bool]"
        }
      ]
    }
  ],
  "links": [
    {
      "target": "build_filter_keys",
      "package_name": "ree_hash",
      "as": "build_filter_keys",
      "imports": [

      ]
    }
  ]
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ree_lib-1.0.32 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.31 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.30 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.29 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.28 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.27 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.26 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.24 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.23 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.22 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.21 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.20 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.19 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.18 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.17 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.16 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.15 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.14 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.13 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json
ree_lib-1.0.12 lib/ree_lib/packages/ree_hash/schemas/ree_hash/functions/slice.schema.json