Class: PokeApi::Pokemon
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Pokemon
- Defined in:
- lib/poke_api/pokemon.rb,
lib/poke_api/pokemon/pokemon_move.rb,
lib/poke_api/pokemon/pokemon_stat.rb,
lib/poke_api/pokemon/pokemon_type.rb,
lib/poke_api/pokemon/pokemon_ability.rb,
lib/poke_api/pokemon/pokemon_sprites.rb,
lib/poke_api/pokemon/pokemon_held_item.rb,
lib/poke_api/pokemon/pokemon_move_version.rb,
lib/poke_api/pokemon/location_area_encounter.rb,
lib/poke_api/pokemon/pokemon_held_item_version.rb
Overview
Pokemon object handling all data fetched from /pokemon
Defined Under Namespace
Classes: LocationAreaEncounter, PokemonAbility, PokemonHeldItem, PokemonHeldItemVersion, PokemonMove, PokemonMoveVersion, PokemonSprites, PokemonStat, PokemonType
Instance Attribute Summary collapse
-
#abilities ⇒ Object
readonly
Returns the value of attribute abilities.
-
#base_experience ⇒ Object
readonly
Returns the value of attribute base_experience.
-
#forms ⇒ Object
readonly
Returns the value of attribute forms.
-
#game_indices ⇒ Object
readonly
Returns the value of attribute game_indices.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#held_items ⇒ Object
readonly
Returns the value of attribute held_items.
-
#is_default ⇒ Object
readonly
Returns the value of attribute is_default.
-
#location_area_encounters ⇒ Object
readonly
Returns the value of attribute location_area_encounters.
-
#moves ⇒ Object
readonly
Returns the value of attribute moves.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#species ⇒ Object
readonly
Returns the value of attribute species.
-
#sprites ⇒ Object
readonly
Returns the value of attribute sprites.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Pokemon
constructor
A new instance of Pokemon.
Methods inherited from NamedApiResource
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ Pokemon
Returns a new instance of Pokemon.
20 21 22 |
# File 'lib/poke_api/pokemon.rb', line 20 def initialize(data) assign_data(data) end |
Instance Attribute Details
#abilities ⇒ Object (readonly)
Returns the value of attribute abilities.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def abilities @abilities end |
#base_experience ⇒ Object (readonly)
Returns the value of attribute base_experience.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def base_experience @base_experience end |
#forms ⇒ Object (readonly)
Returns the value of attribute forms.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def forms @forms end |
#game_indices ⇒ Object (readonly)
Returns the value of attribute game_indices.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def game_indices @game_indices end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def height @height end |
#held_items ⇒ Object (readonly)
Returns the value of attribute held_items.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def held_items @held_items end |
#is_default ⇒ Object (readonly)
Returns the value of attribute is_default.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def is_default @is_default end |
#location_area_encounters ⇒ Object (readonly)
Returns the value of attribute location_area_encounters.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def location_area_encounters @location_area_encounters end |
#moves ⇒ Object (readonly)
Returns the value of attribute moves.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def moves @moves end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def order @order end |
#species ⇒ Object (readonly)
Returns the value of attribute species.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def species @species end |
#sprites ⇒ Object (readonly)
Returns the value of attribute sprites.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def sprites @sprites end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def stats @stats end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def types @types end |
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
4 5 6 |
# File 'lib/poke_api/pokemon.rb', line 4 def weight @weight end |