Class: String
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
8 9 10 |
# File 'lib/core_ext/string.rb', line 8 def blank? self == "" end |
#titleize ⇒ Object
2 3 4 5 6 |
# File 'lib/core_ext/string.rb', line 2 def titleize self.split(" ").reduce("") { |phrase,token| phrase += token[0].upcase + token[1..-1] + " " }.strip end |