Method: Sfn::CommandModule::Base::InstanceMethods#as_title

Defined in:
lib/sfn/command_module/base.rb

#as_title(string) ⇒ String

Format snake cased key to title

Parameters:

  • string (String, Symbol)

Returns:

  • (String)

    String



89
90
91
# File 'lib/sfn/command_module/base.rb', line 89

def as_title(string)
  string.to_s.split("_").map(&:capitalize).join(" ")
end