Sha256: c1eea70a6b55e9326c7d22eb6e29955c02b672e07596497751f1b38553b551e6

Contents?: true

Size: 188 Bytes

Versions: 8

Compression:

Stored size: 188 Bytes

Contents

class String
  def underscored
    self.gsub(/([A-Z])/, '_\1').downcase
  end
  
  def lower_camelized
    self.gsub(/(_)(.)/) { $2.upcase }
  end
  
  def to_ga
    "ga:#{self}"
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
jonuts-garb-0.2.3 lib/extensions/string.rb
vigetlabs-garb-0.1.2 lib/extensions/string.rb
vigetlabs-garb-0.2.0 lib/extensions/string.rb
vigetlabs-garb-0.2.1 lib/extensions/string.rb
vigetlabs-garb-0.2.2 lib/extensions/string.rb
vigetlabs-garb-0.2.3 lib/extensions/string.rb
garb-0.2.1 lib/extensions/string.rb
garb-0.2.3 lib/extensions/string.rb