Class: String

Inherits:
Object show all
Defined in:
lib/embargo.rb

Overview

Humanize

Instance Method Summary collapse

Instance Method Details

#humanizeObject


88
89
90
91
92
# File 'lib/embargo.rb', line 88

def humanize
  sub(/\A_+/, '')
    .tr('_', ' ')
    .sub(/\A\w/) { |match| match.upcase }
end