Class: PokeApi::Ability
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Ability
- 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
-
#effect_changes ⇒ Object
readonly
Returns the value of attribute effect_changes.
-
#effect_entries ⇒ Object
readonly
Returns the value of attribute effect_entries.
-
#flavor_text_entries ⇒ Object
readonly
Returns the value of attribute flavor_text_entries.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
-
#is_main_series ⇒ Object
readonly
Returns the value of attribute is_main_series.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#pokemon ⇒ Object
readonly
Returns the value of attribute pokemon.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Ability
constructor
A new instance of Ability.
Methods inherited from NamedApiResource
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_changes ⇒ Object (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_entries ⇒ Object (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_entries ⇒ Object (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 |
#generation ⇒ Object (readonly)
Returns the value of attribute generation.
4 5 6 |
# File 'lib/poke_api/ability.rb', line 4 def generation @generation end |
#is_main_series ⇒ Object (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 |
#names ⇒ Object (readonly)
Returns the value of attribute names.
4 5 6 |
# File 'lib/poke_api/ability.rb', line 4 def names @names end |
#pokemon ⇒ Object (readonly)
Returns the value of attribute pokemon.
4 5 6 |
# File 'lib/poke_api/ability.rb', line 4 def pokemon @pokemon end |