Class: PokeApi::Move::MoveStatChange

Inherits:
Object
  • Object
show all
Defined in:
lib/poke_api/move/move_stat_change.rb

Overview

MoveStatChange object handling all data fetched from /move for stat_changes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ MoveStatChange

Returns a new instance of MoveStatChange.



8
9
10
11
# File 'lib/poke_api/move/move_stat_change.rb', line 8

def initialize(data)
  @change = data[:change]
  @stat = Stat.new(data[:stat])
end

Instance Attribute Details

#changeObject (readonly)

Returns the value of attribute change.



5
6
7
# File 'lib/poke_api/move/move_stat_change.rb', line 5

def change
  @change
end

#statObject (readonly)

Returns the value of attribute stat.



5
6
7
# File 'lib/poke_api/move/move_stat_change.rb', line 5

def stat
  @stat
end