Class: Hextech::League::Champions

Inherits:
Adapter
  • Object
show all
Defined in:
lib/hextech/league/champions.rb

Instance Method Summary collapse

Methods included from Mixins::Callable

included

Methods included from Mixins::ArgumentChecks

#validate_collection_for

Constructor Details

#initializeChampions

Returns a new instance of Champions.



7
8
9
10
11
# File 'lib/hextech/league/champions.rb', line 7

def initialize
  @latest_patch = Hextech::League::Patches.new.latest

  super()
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/hextech/league/champions.rb', line 13

def call
  response = super

  response[:data].each_with_object({}) do |(champion, data), hash|
    hash[champion] = Hextech::League::Response::Champions.new(data)
  end
end