Class: PokeApi::Move::MoveStatChange
- Inherits:
-
Object
- Object
- PokeApi::Move::MoveStatChange
- 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
-
#change ⇒ Object
readonly
Returns the value of attribute change.
-
#stat ⇒ Object
readonly
Returns the value of attribute stat.
Instance Method Summary collapse
-
#initialize(data) ⇒ MoveStatChange
constructor
A new instance of MoveStatChange.
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
#change ⇒ Object (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 |
#stat ⇒ Object (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 |