Sha256: 7d7af3e6f39f7a4808897a96befe39a35b106191c14e4fd586af902895ba80ea

Contents?: true

Size: 644 Bytes

Versions: 3

Compression:

Stored size: 644 Bytes

Contents

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

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

3 entries across 3 versions & 1 rubygems

Version Path
ruby-lol-1.2.0 lib/lol.rb
ruby-lol-1.1.2 lib/lol.rb
ruby-lol-1.1.1 lib/lol.rb