lib/lol.rb in ruby-lol-0.9.5 vs lib/lol.rb in ruby-lol-0.9.6
- old
+ new
@@ -1,32 +1,15 @@
-require "lol/client"
+require 'active_support/core_ext/string/inflections'
+require 'httparty'
+require 'uri'
-require "lol/request"
-require "lol/champion_request"
-require "lol/game_request"
-require "lol/stats_request"
-require "lol/team_request"
-require "lol/league_request"
-require "lol/summoner_request"
+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/model"
-require "lol/champion"
-require "lol/game"
-require "lol/league"
-require "lol/player"
-require "lol/summoner"
-require "lol/rune_page"
-require "lol/rune_slot"
-require "lol/rune"
-require "lol/mastery_page"
-require "lol/talent"
-require "lol/raw_statistic"
-require "lol/player_statistic"
-require "lol/ranked_statistics_summary"
-require "lol/champion_statistics_summary"
-require "lol/team"
-require "lol/roster"
-require "lol/team_member"
-require "lol/team_statistic"
-require "lol/match_summary"
-require "lol/league_entry"
-require "lol/mini_series"
+require 'lol/autoloader'