Sha256: d2309e3160685c25aa457dd2ac7f0b40564abea80936015de6c1cd410dc1159f

Contents?: true

Size: 844 Bytes

Versions: 4

Compression:

Stored size: 844 Bytes

Contents

{
  "schema_type": "object",
  "ree_version": "1.0.1",
  "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

4 entries across 4 versions & 1 rubygems

Version Path
ree_lib-1.0.3 lib/ree_lib/packages/ree_array/schemas/ree_array/functions/wrap.schema.json
ree_lib-1.0.2 lib/ree_lib/packages/ree_array/schemas/ree_array/functions/wrap.schema.json
ree_lib-1.0.1 lib/ree_lib/packages/ree_array/schemas/ree_array/functions/wrap.schema.json
ree_lib-1.0.0 lib/ree_lib/packages/ree_array/schemas/ree_array/functions/wrap.schema.json