Class: PokeApi::Nature::NatureStatChange
- Inherits:
-
Object
- Object
- PokeApi::Nature::NatureStatChange
- Defined in:
- lib/poke_api/nature/nature_stat_change.rb
Overview
NatureStatChange object handling all data fetched from /nature pokeathlon_stat_changes
Instance Attribute Summary collapse
-
#max_change ⇒ Object
readonly
Returns the value of attribute max_change.
-
#pokeathlon_stat ⇒ Object
readonly
Returns the value of attribute pokeathlon_stat.
Instance Method Summary collapse
-
#initialize(data) ⇒ NatureStatChange
constructor
A new instance of NatureStatChange.
Constructor Details
#initialize(data) ⇒ NatureStatChange
Returns a new instance of NatureStatChange.
8 9 10 11 |
# File 'lib/poke_api/nature/nature_stat_change.rb', line 8 def initialize(data) @max_change = data[:max_change] @pokeathlon_stat = PokeathlonStat.new(data[:pokeathlon_stat]) end |
Instance Attribute Details
#max_change ⇒ Object (readonly)
Returns the value of attribute max_change.
5 6 7 |
# File 'lib/poke_api/nature/nature_stat_change.rb', line 5 def max_change @max_change end |
#pokeathlon_stat ⇒ Object (readonly)
Returns the value of attribute pokeathlon_stat.
5 6 7 |
# File 'lib/poke_api/nature/nature_stat_change.rb', line 5 def pokeathlon_stat @pokeathlon_stat end |