Class: PokeApi::Stat::NatureStatAffectSets

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

Overview

NatureStatAffectSets object handling all data fetched from /stat for affecting_natures

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

Returns a new instance of NatureStatAffectSets.



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

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

Instance Attribute Details

#decreaseObject (readonly)

Returns the value of attribute decrease.



7
8
9
# File 'lib/poke_api/stat/nature_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/nature_stat_affect_sets.rb', line 7

def increase
  @increase
end