Class: Hextech::League::Champions
- Defined in:
- lib/hextech/league/champions.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ Champions
constructor
A new instance of Champions.
Methods included from Mixins::Callable
Methods included from Mixins::ArgumentChecks
Constructor Details
#initialize ⇒ Champions
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
#call ⇒ Object
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 |