Class: PokeApi::Nature::NatureStatChange

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

Instance Method Summary collapse

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