Class: PokeApi::PokemonSpecies::PokemonSpeciesDexEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/pokemon_species/pokemon_species_dex_entry.rb

Overview

PokemonSpeciesDexEntry object handling all data fetched from /pokemon-species pokedex_numbers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ PokemonSpeciesDexEntry

Returns a new instance of PokemonSpeciesDexEntry.



8
9
10
11
# File 'lib/poke_api/pokemon_species/pokemon_species_dex_entry.rb', line 8

def initialize(data)
  @entry_number = data[:entry_number]
  @pokedex = Pokedex.new(data[:pokedex])
end

Instance Attribute Details

#entry_numberObject (readonly)

Returns the value of attribute entry_number.



5
6
7
# File 'lib/poke_api/pokemon_species/pokemon_species_dex_entry.rb', line 5

def entry_number
  @entry_number
end

#pokedexObject (readonly)

Returns the value of attribute pokedex.



5
6
7
# File 'lib/poke_api/pokemon_species/pokemon_species_dex_entry.rb', line 5

def pokedex
  @pokedex
end