module Puree::Util::String
String
utilities.
Public Class Methods
titleize(x)
click to toggle source
Titleize Assumes underscore as separator. e.g. foo_bar becomes FooBar
# File lib/puree/util/string.rb, line 11 def self.titleize(x) arr = "#{x}".split('_') caps = arr.map { |i| i.capitalize } caps.join end