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