Class: PokeApi::Type
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Type
- Defined in:
- lib/poke_api/type.rb,
lib/poke_api/type/type_pokemon.rb,
lib/poke_api/type/type_relations.rb
Overview
Type object handling all data fetched from /type
Defined Under Namespace
Classes: TypePokemon, TypeRelations
Instance Attribute Summary collapse
-
#damage_relations ⇒ Object
readonly
Returns the value of attribute damage_relations.
-
#game_indices ⇒ Object
readonly
Returns the value of attribute game_indices.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
-
#move ⇒ Object
readonly
Returns the value of attribute move.
-
#move_damage_class ⇒ Object
readonly
Returns the value of attribute move_damage_class.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#pokemon ⇒ Object
readonly
Returns the value of attribute pokemon.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Type
constructor
A new instance of Type.
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) ⇒ Type
Returns a new instance of Type.
12 13 14 |
# File 'lib/poke_api/type.rb', line 12 def initialize(data) assign_data(data) end |
Instance Attribute Details
#damage_relations ⇒ Object (readonly)
Returns the value of attribute damage_relations.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def damage_relations @damage_relations end |
#game_indices ⇒ Object (readonly)
Returns the value of attribute game_indices.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def game_indices @game_indices end |
#generation ⇒ Object (readonly)
Returns the value of attribute generation.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def generation @generation end |
#move ⇒ Object (readonly)
Returns the value of attribute move.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def move @move end |
#move_damage_class ⇒ Object (readonly)
Returns the value of attribute move_damage_class.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def move_damage_class @move_damage_class end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def names @names end |
#pokemon ⇒ Object (readonly)
Returns the value of attribute pokemon.
4 5 6 |
# File 'lib/poke_api/type.rb', line 4 def pokemon @pokemon end |