Class: Cmdlet::Case::Human

Inherits:
BaseCmdlet show all
Defined in:
lib/cmdlet/case/human.rb

Overview

Human: Human case the characters in the given 'string'

Instance Method Summary collapse

Methods inherited from BaseCmdlet

#tokenizer

Instance Method Details

#call(value) ⇒ String

Returns value converted to human case.

Parameters:

  • value (String|Int)
    • value - to be converted

Returns:

  • (String)

    value converted to human case



11
12
13
14
15
16
17
# File 'lib/cmdlet/case/human.rb', line 11

def call(value)
  tokenizer.parse(value,
                  separator: ' ',
                  preserve_case: true,
                  compress_prefix_numerals: false,
                  compress_suffix_numerals: false).humanize
end