Class: Oakdex::Pokedex::Move

Inherits:
Base
  • Object
show all
Defined in:
lib/oakdex/pokedex/move.rb

Overview

Represents the move of a Pokemon

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

add_to_all, all, find, find!, #initialize, json_folder, #method_missing, reset!, #respond_to_missing?, translate, where

Constructor Details

This class inherits a constructor from Oakdex::Pokedex::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Oakdex::Pokedex::Base

Instance Method Details

#description(lang = 'en') ⇒ Object



22
23
24
25
# File 'lib/oakdex/pokedex/move.rb', line 22

def description(lang = 'en')
  @attributes['pokedex_entries'].values.last[lang] ||
    @attributes['pokedex_entries'].values.last['en']
end

#in_battle_properties ⇒ Object



18
19
20
# File 'lib/oakdex/pokedex/move.rb', line 18

def in_battle_properties
  @attributes['in_battle_properties'] || {}
end

#pp ⇒ Object



10
11
12
# File 'lib/oakdex/pokedex/move.rb', line 10

def pp
  @attributes['pp']
end

#stat_modifiers ⇒ Object



14
15
16
# File 'lib/oakdex/pokedex/move.rb', line 14

def stat_modifiers
  @attributes['stat_modifiers'] || []
end