Sha256: 5c457837125c6519a0d04ea4e2df5202a1705ed8522be251014e1419e2d08a0c
Contents?: true
Size: 1.58 KB
Versions: 28
Compression:
Stored size: 1.58 KB
Contents
{ "schema_type": "object", "schema_version": "1.0", "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", "type": "Array" }, { "arg": "locale", "type": "Symbol" }, { "arg": "opts", "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
28 entries across 28 versions & 1 rubygems