class PokeApi::Pokemon

Pokemon object handling all data fetched from /pokemon

Attributes

abilities[R]
base_experience[R]
forms[R]
game_indices[R]
height[R]
held_items[R]
is_default[R]
location_area_encounters[R]
moves[R]
order[R]
species[R]
sprites[R]
stats[R]
types[R]
weight[R]

Public Class Methods

new(data) click to toggle source
# File lib/poke_api/pokemon.rb, line 20
def initialize(data)
  assign_data(data)
end

Private Instance Methods

custom_endpoint_object() click to toggle source
# File lib/poke_api/pokemon.rb, line 26
def custom_endpoint_object
  {
    abilities: PokemonAbility,
    forms: PokemonForm,
    game_indices: Common::VersionGameIndex,
    held_items: PokemonHeldItem,
    moves: PokemonMove,
    species: PokemonSpecies,
    sprites: PokemonSprites,
    stats: PokemonStat,
    types: PokemonType
  }
end