Class: PokeApi::Common::GenerationGameIndex
- Inherits:
-
Object
- Object
- PokeApi::Common::GenerationGameIndex
- Defined in:
- lib/poke_api/common/generation_game_index.rb
Overview
GenerationGameIndex object handling lists of game_index and generation
Instance Attribute Summary collapse
-
#game_index ⇒ Object
readonly
Returns the value of attribute game_index.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
Instance Method Summary collapse
-
#initialize(data) ⇒ GenerationGameIndex
constructor
A new instance of GenerationGameIndex.
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_index ⇒ Object (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 |
#generation ⇒ Object (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 |