Class: PokeApi::Generation
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Generation
- Defined in:
- lib/poke_api/generation.rb
Overview
Generation object handling all data fetched from /generation
Instance Attribute Summary collapse
-
#abilities ⇒ Object
readonly
Returns the value of attribute abilities.
-
#main_region ⇒ Object
readonly
Returns the value of attribute main_region.
-
#moves ⇒ Object
readonly
Returns the value of attribute moves.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#pokemon_species ⇒ Object
readonly
Returns the value of attribute pokemon_species.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#version_groups ⇒ Object
readonly
Returns the value of attribute version_groups.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Generation
constructor
A new instance of Generation.
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) ⇒ Generation
Returns a new instance of Generation.
12 13 14 |
# File 'lib/poke_api/generation.rb', line 12 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/generation.rb', line 4 def abilities @abilities end |
#main_region ⇒ Object (readonly)
Returns the value of attribute main_region.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def main_region @main_region end |
#moves ⇒ Object (readonly)
Returns the value of attribute moves.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def moves @moves end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def names @names end |
#pokemon_species ⇒ Object (readonly)
Returns the value of attribute pokemon_species.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def pokemon_species @pokemon_species end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def types @types end |
#version_groups ⇒ Object (readonly)
Returns the value of attribute version_groups.
4 5 6 |
# File 'lib/poke_api/generation.rb', line 4 def version_groups @version_groups end |