Class: Move
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
#accuracy ⇒ Object
21
22
23
|
# File 'lib/pokeruby/move.rb', line 21
def accuracy
@move['accuracy']
end
|
#category ⇒ Object
25
26
27
|
# File 'lib/pokeruby/move.rb', line 25
def category
@move['category']
end
|
#description ⇒ Object
13
14
15
|
# File 'lib/pokeruby/move.rb', line 13
def description
@move['description']
end
|
#name ⇒ Object
9
10
11
|
# File 'lib/pokeruby/move.rb', line 9
def name
@move['name']
end
|
#power ⇒ Object
17
18
19
|
# File 'lib/pokeruby/move.rb', line 17
def power
@move['power']
end
|
#pp ⇒ Object
29
30
31
|
# File 'lib/pokeruby/move.rb', line 29
def pp
@move['pp']
end
|