Class: PokeApi::Stat::MoveStatAffectSets

Inherits:
Object
  • Object
show all
Includes:
AssignmentHelpers
Defined in:
lib/poke_api/stat/move_stat_affect_sets.rb

Overview

MoveStatAffectSets object handling all data fetched from /stat for affecting_moves

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

Returns a new instance of MoveStatAffectSets.



10
11
12
13
# File 'lib/poke_api/stat/move_stat_affect_sets.rb', line 10

def initialize(data)
  @increase = assign_list(data: data[:increase], klass: MoveStatAffect)
  @decrease = assign_list(data: data[:decrease], klass: MoveStatAffect)
end

Instance Attribute Details

#decreaseObject (readonly)

Returns the value of attribute decrease.



7
8
9
# File 'lib/poke_api/stat/move_stat_affect_sets.rb', line 7

def decrease
  @decrease
end

#increaseObject (readonly)

Returns the value of attribute increase.



7
8
9
# File 'lib/poke_api/stat/move_stat_affect_sets.rb', line 7

def increase
  @increase
end