Sha256: 992059ad211d16a7142e8244776bb8408178d315953465365b72363102b85dec
Contents?: true
Size: 309 Bytes
Versions: 16
Compression:
Stored size: 309 Bytes
Contents
module CLIUtils # A Behavior to titlecase a Pref answer class TitlecaseBehavior < PrefBehavior # Evaluates the behavior against the text. # @param [Object] text The "text" to evaluate # @return [String] def evaluate(text) text.to_s.split.map(&:capitalize).join(' ') end end end
Version data entries
16 entries across 16 versions & 1 rubygems