Class: PokeApi::Ability

Inherits:
NamedApiResource show all
Defined in:
lib/poke_api/ability.rb,
lib/poke_api/ability/ability_pokemon.rb,
lib/poke_api/ability/ability_flavor_text.rb,
lib/poke_api/ability/ability_effect_change.rb

Overview

Ability object handling all data fetched from /ability

Defined Under Namespace

Classes: AbilityEffectChange, AbilityFlavorText, AbilityPokemon

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) ⇒ Ability

Returns a new instance of Ability.



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

def initialize(data)
  assign_data(data)
end

Instance Attribute Details

#effect_changesObject (readonly)

Returns the value of attribute effect_changes.



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

def effect_changes
  @effect_changes
end

#effect_entriesObject (readonly)

Returns the value of attribute effect_entries.



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

def effect_entries
  @effect_entries
end

#flavor_text_entriesObject (readonly)

Returns the value of attribute flavor_text_entries.



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

def flavor_text_entries
  @flavor_text_entries
end

#generationObject (readonly)

Returns the value of attribute generation.



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

def generation
  @generation
end

#is_main_seriesObject (readonly)

Returns the value of attribute is_main_series.



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

def is_main_series
  @is_main_series
end

#namesObject (readonly)

Returns the value of attribute names.



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

def names
  @names
end

#pokemonObject (readonly)

Returns the value of attribute pokemon.



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

def pokemon
  @pokemon
end