Module: Lol

Defined in:
lib/lol.rb,
lib/lol/game.rb,
lib/lol/team.rb,
lib/lol/model.rb,
lib/lol/client.rb,
lib/lol/league.rb,
lib/lol/player.rb,
lib/lol/roster.rb,
lib/lol/mastery.rb,
lib/lol/request.rb,
lib/lol/version.rb,
lib/lol/champion.rb,
lib/lol/summoner.rb,
lib/lol/rune_page.rb,
lib/lol/rune_slot.rb,
lib/lol/mini_series.rb,
lib/lol/team_member.rb,
lib/lol/game_request.rb,
lib/lol/league_entry.rb,
lib/lol/mastery_page.rb,
lib/lol/team_request.rb,
lib/lol/dynamic_model.rb,
lib/lol/match_request.rb,
lib/lol/match_summary.rb,
lib/lol/stats_request.rb,
lib/lol/league_request.rb,
lib/lol/static_request.rb,
lib/lol/team_statistic.rb,
lib/lol/champion_request.rb,
lib/lol/player_statistic.rb,
lib/lol/summoner_request.rb,
lib/lol/lol_status_request.rb,
lib/lol/current_game_request.rb,
lib/lol/invalid_api_response.rb,
lib/lol/match_history_request.rb,
lib/lol/featured_games_request.rb,
lib/lol/ranked_statistics_summary.rb,
lib/lol/champion_statistics_summary.rb

Defined Under Namespace

Classes: Champion, ChampionRequest, ChampionStatisticsSummary, Client, CurrentGameRequest, DynamicModel, FeaturedGamesRequest, Game, GameRequest, InvalidAPIResponse, InvalidCacheStore, League, LeagueEntry, LeagueRequest, LolStatusRequest, Mastery, MasteryPage, MatchHistoryRequest, MatchRequest, MatchSummary, MiniSeries, Model, NotFound, Player, PlayerStatistic, RankedStatisticsSummary, Request, Roster, RunePage, RuneSlot, StaticRequest, StatsRequest, Summoner, SummonerRequest, Team, TeamMember, TeamRequest, TeamStatistic

Constant Summary collapse

VERSION =
"0.10.0"

Class Method Summary collapse

Class Method Details

.underscore_hash_keys(hash) ⇒ Hash

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

Parameters:

  • a (Hash)

    hash with keys in camelCase format

Returns:

  • (Hash)

    a copy of the original hash, with hash keys that have been underscored



11
12
13
# File 'lib/lol.rb', line 11

def self.underscore_hash_keys hash
  hash.inject({}) { |memo, (key, value)| memo.update key.to_s.underscore => value }
end