Class: PokeApi::Common::GenerationGameIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/common/generation_game_index.rb

Overview

GenerationGameIndex object handling lists of game_index and generation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ GenerationGameIndex

Returns a new instance of GenerationGameIndex.



8
9
10
11
# File 'lib/poke_api/common/generation_game_index.rb', line 8

def initialize(data)
  @game_index = data[:game_index]
  @generation = Generation.new(data[:generation])
end

Instance Attribute Details

#game_indexObject (readonly)

Returns the value of attribute game_index.



5
6
7
# File 'lib/poke_api/common/generation_game_index.rb', line 5

def game_index
  @game_index
end

#generationObject (readonly)

Returns the value of attribute generation.



5
6
7
# File 'lib/poke_api/common/generation_game_index.rb', line 5

def generation
  @generation
end