Class: PokeApi::PokemonSpecies::Genus

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/pokemon_species/genus.rb

Overview

Genus object handling all data fetched from /pokemon-species genera

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Genus

Returns a new instance of Genus.



8
9
10
11
# File 'lib/poke_api/pokemon_species/genus.rb', line 8

def initialize(data)
  @genus = data[:genus]
  @language = Utility::Language.new(data[:language])
end

Instance Attribute Details

#genusObject (readonly)

Returns the value of attribute genus.



5
6
7
# File 'lib/poke_api/pokemon_species/genus.rb', line 5

def genus
  @genus
end

#languageObject (readonly)

Returns the value of attribute language.



5
6
7
# File 'lib/poke_api/pokemon_species/genus.rb', line 5

def language
  @language
end