Sha256: 9dbaf608f23dd308cca20ea80fd5d2cfe2b8576aacd12742bdcfb51678760c16

Contents?: true

Size: 305 Bytes

Versions: 1

Compression:

Stored size: 305 Bytes

Contents

class String
  def uchars
    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

1 entries across 1 versions & 1 rubygems

Version Path
ting-0.3.0 lib/ting/support.rb