Class: PokeApi::PokemonSpecies::PokemonSpeciesDexEntry
- Inherits:
-
Object
- Object
- PokeApi::PokemonSpecies::PokemonSpeciesDexEntry
- 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
-
#entry_number ⇒ Object
readonly
Returns the value of attribute entry_number.
-
#pokedex ⇒ Object
readonly
Returns the value of attribute pokedex.
Instance Method Summary collapse
-
#initialize(data) ⇒ PokemonSpeciesDexEntry
constructor
A new instance of PokemonSpeciesDexEntry.
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_number ⇒ Object (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 |
#pokedex ⇒ Object (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 |