Sha256: 4ce426a29a0ceb8c47afc77930ec7081b3a9f0220669e376d2473b15f1d7e6b7

Contents?: true

Size: 1.7 KB

Versions: 4

Compression:

Stored size: 1.7 KB

Contents

{
  "schema_type": "object",
  "ree_version": "1.0.1",
  "name": "number_to_currency",
  "path": "packages/ree_number/package/ree_number/functions/number_to_currency.rb",
  "mount_as": "fn",
  "class": "ReeNumber::NumberToCurrency",
  "factory": null,
  "methods": [
    {
      "doc": "Converts Integer, Float or String to a String with currency sign and delimiters.\n  number_to_currency(1234567890.506)\n  # => \"$1,234,567,890.51\"\n\n  number_to_currency(-1234567890.50)\n  # => \"-$1,234,567,890.50\"\n\n  number_to_currency(1234567890.50, unit: \"&pound\")\n  # => \"&pound1,234,567,890.50\"\n  \n  number_to_currency(1234567890.50, unit: \"£\", separator: \",\", delimiter: \"\")\n  # => \"£1234567890,50\"",
      "throws": [

      ],
      "return": "String",
      "args": [
        {
          "arg": "number",
          "type": "Or[Integer, Float, String]"
        },
        {
          "arg": "opts",
          "type": "Ksplat[:format? => String, :precision? => Integer, :unit? => String, :negative_format? => String, :separator? => String, :delimiter? => String, :significant? => Bool, :strip_insignificant_zeros? => Bool, :round_mode? => Or[up, down, truncate, half_up, default, half_down, half_even, banker, ceiling, floor]]"
        }
      ]
    }
  ],
  "links": [
    {
      "target": "number_to_delimited",
      "package_name": "ree_number",
      "as": "number_to_delimited",
      "imports": [

      ]
    },
    {
      "target": "number_to_rounded",
      "package_name": "ree_number",
      "as": "number_to_rounded",
      "imports": [
        "ROUND_MODES"
      ]
    },
    {
      "target": "slice",
      "package_name": "ree_hash",
      "as": "slice",
      "imports": [

      ]
    }
  ]
}

Version data entries

4 entries across 4 versions & 1 rubygems

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