Class: EggGroup

Inherits:
PokeApi show all
Defined in:
lib/pokeruby/egg_group.rb

Instance Method Summary collapse

Methods inherited from PokeApi

get, get_resource, type_chart

Constructor Details

#initialize(id) ⇒ EggGroup

Returns a new instance of EggGroup.



5
6
7
# File 'lib/pokeruby/egg_group.rb', line 5

def initialize id
	@egg_group = self.class.get "#{id}"
end

Instance Method Details

#nameObject



9
10
11
# File 'lib/pokeruby/egg_group.rb', line 9

def name
	@egg_group['name']
end

#pokemonObject



13
14
15
# File 'lib/pokeruby/egg_group.rb', line 13

def pokemon
	@egg_group['pokemon']
end