Class: PokeApi::Nature::MoveBattleStylePreference

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

Instance Method Summary collapse

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_preferenceObject (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_preferenceObject (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_styleObject (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