Sha256: 29a0c4fd61676d43cf36090a930d068bc74cca12a9f05ab04962d9ee3b5b7621

Contents?: true

Size: 581 Bytes

Versions: 7

Compression:

Stored size: 581 Bytes

Contents

require 'active_support/core_ext/string/inflections'
require 'httparty'
require 'uri'
require 'redis'

module Lol
  # Takes a hash and returns a copy of it with the keys that have been underscored
  # This method is here but should be somewhere else, probably an helper module
  # @param [Hash] a hash with keys in camelCase format
  # @return [Hash] a copy of the original hash, with hash keys that have been underscored
  def self.underscore_hash_keys hash
    hash.inject({}) { |memo, (key, value)| memo.update key.to_s.underscore => value }
  end
end

require 'lol/autoloader'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-lol-0.9.17 lib/lol.rb
ruby-lol-0.9.16 lib/lol.rb
ruby-lol-0.9.15 lib/lol.rb
ruby-lol-0.9.14 lib/lol.rb
ruby-lol-0.9.13 lib/lol.rb
ruby-lol-0.9.12 lib/lol.rb
ruby-lol-0.9.11 lib/lol.rb