Sha256: f89f209583a7b4d781a5180ed3ac7bca025dfffa16ec852bc5cf9f9b6960adcd

Contents?: true

Size: 242 Bytes

Versions: 6

Compression:

Stored size: 242 Bytes

Contents

class String
  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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hyper-component-1.0.alpha1.8 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.7 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.6 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.5 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.4 lib/hyperstack/ext/component/string.rb
hyper-component-1.0.alpha1.3 lib/hyperstack/ext/component/string.rb