{ "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": [ ] }