Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/vx/worker/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#camelizeObject



6
7
8
# File 'lib/vx/worker/ext/string.rb', line 6

def camelize
  split("_").each {|s| s.capitalize! }.join("")
end

#compactObject



2
3
4
# File 'lib/vx/worker/ext/string.rb', line 2

def compact
  gsub(/\n/, ' ').gsub(/ +/, ' ').strip
end