Sha256: 312dc4eea40eed37d0a771b99073dd1a0b10fdbaf25446b315f8fc3a35876128
Contents?: true
Size: 304 Bytes
Versions: 2
Compression:
Stored size: 304 Bytes
Contents
class String def chars self.unpack('U*').map{|c| [c].pack('U')} end def camelcase str = dup str.gsub!(/(?:_+|-+)([a-z])/){ $1.upcase } str.gsub!(/(\A|\s)([a-z])/){ $1 + $2.upcase } str end end module Kernel def returning(s) yield(s) s end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ting-0.2.1 | lib/ting/support.rb |
ting-0.2.0 | lib/ting/support.rb |