Sha256: c2ae76977c5edf39cfb2458b8e815f039e04234398ca544276b4c9cdf22b001f

Contents?: true

Size: 1.64 KB

Versions: 28

Compression:

Stored size: 1.64 KB

Contents

{
  "schema_type": "object",
  "schema_version": "1.0",
  "name": "number_to_percentage",
  "path": "packages/ree_number/package/ree_number/functions/number_to_percentage.rb",
  "mount_as": "fn",
  "class": "ReeNumber::NumberToPercentage",
  "factory": null,
  "methods": [
    {
      "doc": "Converts Integer, String or Float to a String with percentage at the end.\nThe +opts+ parameter takes a hash of any of these keys:\n    <tt>:format</tt>, <tt>:precision</tt>, \n    <tt>:significant</tt>, <tt>:strip_insignificant_zeros</tt>, <tt>:delimiter</tt>,\n    <tt>:round_mode</tt>\n  number_to_percentage(100)                                                      # => \"100.000%\"\n  number_to_percentage(123.400, precision: 3, strip_insignificant_zeros: true)   # => \"123.4%\"\n  number_to_percentage.(\"-0.13\", format_percentage: \" %\", precision: 2)          # => \"-0.13 %\"",
      "throws": [

      ],
      "return": "String",
      "args": [
        {
          "arg": "number",
          "type": "Or[Integer, String, Float]"
        },
        {
          "arg": "opts",
          "type": "Ksplat[:format? => String, :precision? => Integer, :significant? => Bool, :strip_insignificant_zeros? => Bool, :delimiter? => String, :round_mode? => Or[up, down, truncate, half_up, default, half_down, half_even, banker, ceiling, floor]]"
        }
      ]
    }
  ],
  "links": [
    {
      "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

28 entries across 28 versions & 1 rubygems

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