Class: PokeApi::PokeathlonStat::NaturePokeathlonStatAffect

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_changeObject (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

#natureObject (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