Sha256: e68322504d5508b48dd18887ba6db9cbae17a26e89c204fd052ab33e4dba3737

Contents?: true

Size: 234 Bytes

Versions: 63

Compression:

Stored size: 234 Bytes

Contents

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

Version data entries

63 entries across 63 versions & 4 rubygems

Version Path
react.rb-0.1.0 lib/react/ext/string.rb
react.rb-0.0.2 lib/react/ext/string.rb
react.rb-0.0.1 lib/react/ext/string.rb