Sha256: 3acb7cd04a2d6b617559f6160b63537d6be91f44e548b690834b845f645b0820

Contents?: true

Size: 616 Bytes

Versions: 15

Compression:

Stored size: 616 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'
require "lol/invalid_api_response"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ruby-lol-1.0.0 lib/lol.rb
ruby-lol-0.12.2 lib/lol.rb
ruby-lol-0.12.1 lib/lol.rb
ruby-lol-0.12.0 lib/lol.rb
ruby-lol-0.11.6 lib/lol.rb
ruby-lol-0.11.5 lib/lol.rb
ruby-lol-0.11.4 lib/lol.rb
ruby-lol-0.11.3 lib/lol.rb
ruby-lol-0.11.2 lib/lol.rb
ruby-lol-0.11.1 lib/lol.rb
ruby-lol-0.11.0 lib/lol.rb
ruby-lol-0.10.0 lib/lol.rb
ruby-lol-0.9.19.1 lib/lol.rb
ruby-lol-0.9.19 lib/lol.rb
ruby-lol-0.9.18 lib/lol.rb