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
reactive-ruby-0.7.41 lib/react/ext/string.rb
reactive-ruby-0.7.40 lib/react/ext/string.rb
reactive-ruby-0.7.39 lib/react/ext/string.rb
reactive-ruby-0.7.38 lib/react/ext/string.rb
reactive-ruby-0.7.36 lib/react/ext/string.rb
reactive-ruby-0.7.35 lib/react/ext/string.rb
reactive-ruby-0.7.34 lib/react/ext/string.rb
reactive-ruby-0.7.33 lib/react/ext/string.rb
reactive-ruby-0.7.32 lib/react/ext/string.rb
reactive-ruby-0.7.31 lib/react/ext/string.rb
reactive-ruby-0.7.30 lib/react/ext/string.rb
reactive-ruby-0.7.29 lib/react/ext/string.rb
reactive-ruby-0.7.28 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.27 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.26 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.25 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.24 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.23 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.22 lib/reactive-ruby/ext/string.rb
reactive-ruby-0.7.21 lib/reactive-ruby/ext/string.rb