Sha256: 9583b24d685a6075c261a933e1673cc560076e9ebc3fbc18f4f32391cb72c3d7

Contents?: true

Size: 845 Bytes

Versions: 28

Compression:

Stored size: 845 Bytes

Contents

{
  "schema_type": "object",
  "schema_version": "1.0",
  "name": "wrap",
  "path": "packages/ree_array/package/ree_array/functions/wrap.rb",
  "mount_as": "fn",
  "class": "ReeArray::Wrap",
  "factory": null,
  "methods": [
    {
      "doc": "Wraps its argument in an array unless it is already an array (or array-like).\n\nSpecifically:\n\n* If the argument is +nil+ an empty array is returned.\n* Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned.\n* Otherwise, returns an array with the argument as its single element.\n\n    wrap(nil)       # => []\n    wrap([1, 2, 3]) # => [1, 2, 3]\n    wrap(0)         # => [0]",
      "throws": [

      ],
      "return": "ArrayOf[Any]",
      "args": [
        {
          "arg": "object",
          "type": "Any"
        }
      ]
    }
  ],
  "links": [

  ]
}

Version data entries

28 entries across 28 versions & 1 rubygems

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