Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/aina/support.rb

Instance Method Summary collapse

Instance Method Details

#camelcaseObject



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/aina/support.rb', line 35

def camelcase
	r = Array.new

	pieces = self.split(' ')
	pieces = self.split('_') unless pieces.length > 1

	pieces.each do |p|
		r << p.capitalize
	end
	r.join()
end