Sha256: 95e6ceb00cad3054a6275e26ceef745411b9da43c2b03087d727526fb3840566

Contents?: true

Size: 1.64 KB

Versions: 4

Compression:

Stored size: 1.64 KB

Contents

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

4 entries across 4 versions & 1 rubygems

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