Sha256: ceb4708763e788356a011c2454c3bd15d033445bd2d02b4c29d21b1edbc5127c

Contents?: true

Size: 281 Bytes

Versions: 2

Compression:

Stored size: 281 Bytes

Contents

# From active-support/inflector.rb
class String
  def camelize(first_letter_in_uppercase = true)
    s = self
    if first_letter_in_uppercase
      s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
    else
      s[0..0] + s.camelize[1..-1]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smallcage-0.2.6 lib/smallcage/misc.rb
smallcage-0.2.5 lib/smallcage/misc.rb