Sha256: e128593ec16e783e80adabb4b78f4606f6ca034d71c4407ba95cdb6dcdb107fa

Contents?: true

Size: 1.67 KB

Versions: 71

Compression:

Stored size: 1.67 KB

Contents

{
  "schema_type": "object",
  "schema_version": "1.1",
  "name": "to_sentence",
  "path": "packages/ree_text/package/ree_text/functions/to_sentence.rb",
  "mount_as": "fn",
  "class": "ReeText::ToSentence",
  "factory": null,
  "methods": [
    {
      "doc": "Converts the array to a comma-separated sentence where the last element is\njoined by the connector word.\n\n  to_sentence([\"one\", \"two\", \"three\"])                                      # => \"one, two, and three\"\n  to_sentence([\"one\", \"two\", \"three\"], words_connector: \" \"))               # => \"one two, and three\"\n  to_sentence([\"one\", \"two\", \"three\"], last_word_connector: \", and also \")  # =>\"one, two, and also three\"\n  to_sentence([\"one\", \"two\"], two_words_connector: \" & \")                   # => \"one & two\"",
      "throws": [

      ],
      "return": "String",
      "args": [
        {
          "arg": "array",
          "arg_type": "req",
          "type": "Array"
        },
        {
          "arg": "locale",
          "arg_type": "key",
          "type": "Symbol"
        },
        {
          "arg": "opts",
          "arg_type": "keyrest",
          "type": "Ksplat[:words_connector? => String, :two_words_connector? => String, :last_word_connector? => String]"
        }
      ]
    }
  ],
  "links": [
    {
      "target": "escape_html",
      "package_name": "ree_text",
      "as": "escape_html",
      "imports": [

      ]
    },
    {
      "target": "safe_join",
      "package_name": "ree_text",
      "as": "safe_join",
      "imports": [

      ]
    },
    {
      "target": "t",
      "package_name": "ree_i18n",
      "as": "t",
      "imports": [

      ]
    }
  ]
}

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
ree_lib-1.0.103 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.102 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.101 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.100 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.99 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.98 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.97 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.96 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.95 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.94 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.93 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.92 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.91 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.90 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.89 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.88 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.87 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.86 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.85 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json
ree_lib-1.0.84 lib/ree_lib/packages/ree_text/schemas/ree_text/functions/to_sentence.schema.json