Class: PokeApi::Ability::AbilityEffectChange
- Inherits:
-
Object
- Object
- PokeApi::Ability::AbilityEffectChange
- Includes:
- AssignmentHelpers
- Defined in:
- lib/poke_api/ability/ability_effect_change.rb
Overview
AbilityEffectChange object handling all data fetched from /ability effect_changes
Instance Attribute Summary collapse
-
#effect_entries ⇒ Object
readonly
Returns the value of attribute effect_entries.
-
#version_group ⇒ Object
readonly
Returns the value of attribute version_group.
Instance Method Summary collapse
-
#initialize(data) ⇒ AbilityEffectChange
constructor
A new instance of AbilityEffectChange.
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ AbilityEffectChange
Returns a new instance of AbilityEffectChange.
10 11 12 13 |
# File 'lib/poke_api/ability/ability_effect_change.rb', line 10 def initialize(data) @effect_entries = assign_list(data: data[:effect_entries], klass: Common::Effect) @version_group = VersionGroup.new(data[:version_group]) end |
Instance Attribute Details
#effect_entries ⇒ Object (readonly)
Returns the value of attribute effect_entries.
7 8 9 |
# File 'lib/poke_api/ability/ability_effect_change.rb', line 7 def effect_entries @effect_entries end |
#version_group ⇒ Object (readonly)
Returns the value of attribute version_group.
7 8 9 |
# File 'lib/poke_api/ability/ability_effect_change.rb', line 7 def version_group @version_group end |