Class: Move

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

Instance Method Summary collapse

Methods inherited from PokeApi

get, get_resource, type_chart

Constructor Details

#initialize(id) ⇒ Move

Returns a new instance of Move.



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

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

Instance Method Details

#accuracyObject



21
22
23
# File 'lib/pokeruby/move.rb', line 21

def accuracy
	@move['accuracy']
end

#categoryObject



25
26
27
# File 'lib/pokeruby/move.rb', line 25

def category
	@move['category']
end

#descriptionObject



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

def description
	@move['description']
end

#nameObject



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

def name
	@move['name']
end

#powerObject



17
18
19
# File 'lib/pokeruby/move.rb', line 17

def power
	@move['power']
end

#ppObject



29
30
31
# File 'lib/pokeruby/move.rb', line 29

def pp
	@move['pp']
end