Class: PokeApi::Ability::AbilityEffectChange

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

Instance Method Summary collapse

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_entriesObject (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_groupObject (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