Class: PokeApi::Stat

Inherits:
NamedApiResource show all
Defined in:
lib/poke_api/stat.rb,
lib/poke_api/stat/move_stat_affect.rb,
lib/poke_api/stat/move_stat_affect_sets.rb,
lib/poke_api/stat/nature_stat_affect_sets.rb

Overview

Stat object handling all data fetched from /stat

Defined Under Namespace

Classes: MoveStatAffect, MoveStatAffectSets, NatureStatAffectSets

Instance Attribute Summary collapse

Attributes inherited from NamedApiResource

#id, #name, #url

Instance Method Summary collapse

Methods inherited from NamedApiResource

#get

Methods included from AssignmentHelpers

assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign

Constructor Details

#initialize(data) ⇒ Stat

Returns a new instance of Stat.



12
13
14
# File 'lib/poke_api/stat.rb', line 12

def initialize(data)
  assign_data(data)
end

Instance Attribute Details

#affecting_movesObject (readonly)

Returns the value of attribute affecting_moves.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def affecting_moves
  @affecting_moves
end

#affecting_naturesObject (readonly)

Returns the value of attribute affecting_natures.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def affecting_natures
  @affecting_natures
end

#characteristicsObject (readonly)

Returns the value of attribute characteristics.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def characteristics
  @characteristics
end

#game_indexObject (readonly)

Returns the value of attribute game_index.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def game_index
  @game_index
end

#is_battle_onlyObject (readonly)

Returns the value of attribute is_battle_only.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def is_battle_only
  @is_battle_only
end

#move_damage_classObject (readonly)

Returns the value of attribute move_damage_class.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def move_damage_class
  @move_damage_class
end

#namesObject (readonly)

Returns the value of attribute names.



4
5
6
# File 'lib/poke_api/stat.rb', line 4

def names
  @names
end