Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/analytics/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#to_camelcase(first_letter = :upper) ⇒ Object
2 3 4 |
# File 'lib/analytics/core_ext/string.rb', line 2 def to_camelcase(first_letter = :upper) self.downcase.gsub(/_\w/) { |x| x[1..1].upcase }.gsub(/^\w/) { |x| first_letter.eql?(:upper) ? x.upcase : x } end |