Class: PokeApi::Move::MoveMetaData

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

Instance Method Summary collapse

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

#ailmentObject (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_chanceObject (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

#categoryObject (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_rateObject (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

#drainObject (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_chanceObject (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

#healingObject (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_hitsObject (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_turnsObject (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_hitsObject (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_turnsObject (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_chanceObject (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