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



92
93
94
# File 'lib/sfn/command_module/base.rb', line 92

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