Class: String

Inherits:
Object show all
Defined in:
lib/react/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#event_camelizeObject



2
3
4
5
6
7
# File 'lib/react/ext/string.rb', line 2

def event_camelize
  `return #{self}.replace(/(^|_)([^_]+)/g, function(match, pre, word, index) {
    var capitalize = true;
    return capitalize ? word.substr(0,1).toUpperCase()+word.substr(1) : word;
  })`
end