module Ktistec::Util
Extended Modules
Defined in:
framework/util.crInstance Method Summary
-
#distance_of_time_in_words(from_time : Time, to_time : Time = Time.utc)
Transforms the span of time between two different times into words.
-
#distance_of_time_in_words(distance : Time::Span)
Transforms the span of time between two different times into words.
-
#id
Generates a random, URL-safe identifier.
-
#pluralize(noun)
Pluralizes a singular noun.
-
#render_as_text(content)
Renders content as simple text.
-
#sanitize(content)
Cleans up the content we receive from others.
-
#to_sentence(array, *, words_connector = ", ", last_word_connector = " and ")
Converts the array of words to comma-separated sentence form where the last word is joined by a connector word (by default "and").
Instance Method Detail
Transforms the span of time between two different times into words.
Transforms the span of time between two different times into words.
Generates a random, URL-safe identifier.
64 bits should ensure it takes about 5 billion attempts to generate a collision.
Converts the array of words to comma-separated sentence form where the last word is joined by a connector word (by default "and").