Class: PokeApi::Move::MoveMetaData
- Inherits:
-
Object
- Object
- PokeApi::Move::MoveMetaData
- Defined in:
- lib/poke_api/move/move_meta_data.rb
Overview
MoveMetaData object handling all data fetched from /move for meta
Instance Attribute Summary collapse
-
#ailment ⇒ Object
readonly
Returns the value of attribute ailment.
-
#ailment_chance ⇒ Object
readonly
Returns the value of attribute ailment_chance.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#crit_rate ⇒ Object
readonly
Returns the value of attribute crit_rate.
-
#drain ⇒ Object
readonly
Returns the value of attribute drain.
-
#flinch_chance ⇒ Object
readonly
Returns the value of attribute flinch_chance.
-
#healing ⇒ Object
readonly
Returns the value of attribute healing.
-
#max_hits ⇒ Object
readonly
Returns the value of attribute max_hits.
-
#max_turns ⇒ Object
readonly
Returns the value of attribute max_turns.
-
#min_hits ⇒ Object
readonly
Returns the value of attribute min_hits.
-
#min_turns ⇒ Object
readonly
Returns the value of attribute min_turns.
-
#stat_chance ⇒ Object
readonly
Returns the value of attribute stat_chance.
Instance Method Summary collapse
-
#initialize(data) ⇒ MoveMetaData
constructor
A new instance of MoveMetaData.
Constructor Details
#initialize(data) ⇒ MoveMetaData
Returns a new instance of MoveMetaData.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/poke_api/move/move_meta_data.rb', line 18 def initialize(data) @ailment = MoveAilment.new(data[:ailment]) @category = MoveCategory.new(data[:category]) @min_hits = data[:min_hits] @max_hits = data[:max_hits] @min_turns = data[:min_turns] @max_turns = data[:max_turns] @drain = data[:drain] @healing = data[:healing] @crit_rate = data[:crit_rate] @ailment_chance = data[:ailment_chance] @flinch_chance = data[:flinch_chance] @stat_chance = data[:stat_chance] end |
Instance Attribute Details
#ailment ⇒ Object (readonly)
Returns the value of attribute ailment.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def ailment @ailment end |
#ailment_chance ⇒ Object (readonly)
Returns the value of attribute ailment_chance.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def ailment_chance @ailment_chance end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def category @category end |
#crit_rate ⇒ Object (readonly)
Returns the value of attribute crit_rate.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def crit_rate @crit_rate end |
#drain ⇒ Object (readonly)
Returns the value of attribute drain.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def drain @drain end |
#flinch_chance ⇒ Object (readonly)
Returns the value of attribute flinch_chance.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def flinch_chance @flinch_chance end |
#healing ⇒ Object (readonly)
Returns the value of attribute healing.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def healing @healing end |
#max_hits ⇒ Object (readonly)
Returns the value of attribute max_hits.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def max_hits @max_hits end |
#max_turns ⇒ Object (readonly)
Returns the value of attribute max_turns.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def max_turns @max_turns end |
#min_hits ⇒ Object (readonly)
Returns the value of attribute min_hits.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def min_hits @min_hits end |
#min_turns ⇒ Object (readonly)
Returns the value of attribute min_turns.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def min_turns @min_turns end |
#stat_chance ⇒ Object (readonly)
Returns the value of attribute stat_chance.
5 6 7 |
# File 'lib/poke_api/move/move_meta_data.rb', line 5 def stat_chance @stat_chance end |