Sha256: 6eee2778e49001c0fcb9a54fd118b58ff20c1e41c7f4806c554e4ad036bb09ea
Contents?: true
Size: 325 Bytes
Versions: 19
Compression:
Stored size: 325 Bytes
Contents
=begin Add String methods +camelize+ and +present?+ to +String+ if activesupport cannot be loaded. =end class String # paraphrased from activesupport def camelize sub(/^[a-z\d]*/) { $&.capitalize }.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }.gsub('/', '::') end def present? !blank? end end
Version data entries
19 entries across 19 versions & 1 rubygems