Class: PokeApi::Nature::MoveBattleStylePreference
- Inherits:
-
Object
- Object
- PokeApi::Nature::MoveBattleStylePreference
- Defined in:
- lib/poke_api/nature/move_battle_style_preference.rb
Overview
MoveBattleStylePreference object handling all data fetched from /nature move_battle_style_preferences
Instance Attribute Summary collapse
-
#high_hp_preference ⇒ Object
readonly
Returns the value of attribute high_hp_preference.
-
#low_hp_preference ⇒ Object
readonly
Returns the value of attribute low_hp_preference.
-
#move_battle_style ⇒ Object
readonly
Returns the value of attribute move_battle_style.
Instance Method Summary collapse
-
#initialize(data) ⇒ MoveBattleStylePreference
constructor
A new instance of MoveBattleStylePreference.
Constructor Details
#initialize(data) ⇒ MoveBattleStylePreference
Returns a new instance of MoveBattleStylePreference.
10 11 12 13 14 |
# File 'lib/poke_api/nature/move_battle_style_preference.rb', line 10 def initialize(data) @low_hp_preference = data[:low_hp_preference] @high_hp_preference = data[:high_hp_preference] @move_battle_style = MoveBattleStyle.new(data[:move_battle_style]) end |
Instance Attribute Details
#high_hp_preference ⇒ Object (readonly)
Returns the value of attribute high_hp_preference.
6 7 8 |
# File 'lib/poke_api/nature/move_battle_style_preference.rb', line 6 def high_hp_preference @high_hp_preference end |
#low_hp_preference ⇒ Object (readonly)
Returns the value of attribute low_hp_preference.
6 7 8 |
# File 'lib/poke_api/nature/move_battle_style_preference.rb', line 6 def low_hp_preference @low_hp_preference end |
#move_battle_style ⇒ Object (readonly)
Returns the value of attribute move_battle_style.
6 7 8 |
# File 'lib/poke_api/nature/move_battle_style_preference.rb', line 6 def move_battle_style @move_battle_style end |