Class: PokeApi::Stat::NatureStatAffectSets
- Inherits:
-
Object
- Object
- PokeApi::Stat::NatureStatAffectSets
- 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
-
#decrease ⇒ Object
readonly
Returns the value of attribute decrease.
-
#increase ⇒ Object
readonly
Returns the value of attribute increase.
Instance Method Summary collapse
-
#initialize(data) ⇒ NatureStatAffectSets
constructor
A new instance of NatureStatAffectSets.
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
#decrease ⇒ Object (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 |
#increase ⇒ Object (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 |