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