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