Class: PokeApi::Type

Inherits:
NamedApiResource show all
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

Attributes inherited from NamedApiResource

#id, #name, #url

Instance Method Summary collapse

Methods inherited from NamedApiResource

#get

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_relationsObject (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_indicesObject (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

#generationObject (readonly)

Returns the value of attribute generation.



4
5
6
# File 'lib/poke_api/type.rb', line 4

def generation
  @generation
end

#moveObject (readonly)

Returns the value of attribute move.



4
5
6
# File 'lib/poke_api/type.rb', line 4

def move
  @move
end

#move_damage_classObject (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

#namesObject (readonly)

Returns the value of attribute names.



4
5
6
# File 'lib/poke_api/type.rb', line 4

def names
  @names
end

#pokemonObject (readonly)

Returns the value of attribute pokemon.



4
5
6
# File 'lib/poke_api/type.rb', line 4

def pokemon
  @pokemon
end