Class: PokeApi::EvolutionChain::EvolutionDetail
- Inherits:
-
Object
- Object
- PokeApi::EvolutionChain::EvolutionDetail
- Includes:
- AssignmentHelpers
- Defined in:
- lib/poke_api/evolution_chain/evolution_detail.rb
Overview
EvolutionDetail object handling details data regarding pokemon evolutions
Instance Attribute Summary collapse
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#held_item ⇒ Object
readonly
Returns the value of attribute held_item.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#known_move ⇒ Object
readonly
Returns the value of attribute known_move.
-
#known_move_type ⇒ Object
readonly
Returns the value of attribute known_move_type.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#min_affection ⇒ Object
readonly
Returns the value of attribute min_affection.
-
#min_beauty ⇒ Object
readonly
Returns the value of attribute min_beauty.
-
#min_happiness ⇒ Object
readonly
Returns the value of attribute min_happiness.
-
#min_level ⇒ Object
readonly
Returns the value of attribute min_level.
-
#needs_overworld_rain ⇒ Object
readonly
Returns the value of attribute needs_overworld_rain.
-
#party_species ⇒ Object
readonly
Returns the value of attribute party_species.
-
#party_type ⇒ Object
readonly
Returns the value of attribute party_type.
-
#relative_physical_stats ⇒ Object
readonly
Returns the value of attribute relative_physical_stats.
-
#time_of_day ⇒ Object
readonly
Returns the value of attribute time_of_day.
-
#trade_species ⇒ Object
readonly
Returns the value of attribute trade_species.
-
#trigger ⇒ Object
readonly
Returns the value of attribute trigger.
-
#turn_upside_down ⇒ Object
readonly
Returns the value of attribute turn_upside_down.
Instance Method Summary collapse
-
#initialize(data) ⇒ EvolutionDetail
constructor
rubocop:disable Metrics/AbcSize, Metrics/MethodLength.
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ EvolutionDetail
rubocop:disable Metrics/AbcSize, Metrics/MethodLength
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 27 def initialize(data) @item = try_to_assign(data: data[:item], klass: Item) @trigger = try_to_assign(data: data[:trigger], klass: EvolutionTrigger) @gender = data[:gender] @held_item = try_to_assign(data: data[:held_item], klass: Item) @known_move = try_to_assign(data: data[:known_move], klass: Move) @known_move_type = try_to_assign(data: data[:known_move_type], klass: Type) @location = try_to_assign(data: data[:location], klass: Location) @min_level = data[:min_level] @min_happiness = data[:min_happiness] @min_beauty = data[:min_beauty] @min_affection = data[:min_affection] @needs_overworld_rain = data[:needs_overworld_rain] @party_species = try_to_assign(data: data[:party_species], klass: PokemonSpecies) @party_type = try_to_assign(data: data[:party_type], klass: Type) @relative_physical_stats = data[:relative_physical_stats] @time_of_day = data[:time_of_day] @trade_species = try_to_assign(data: data[:trade_species], klass: PokemonSpecies) @turn_upside_down = data[:turn_upside_down] end |
Instance Attribute Details
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def gender @gender end |
#held_item ⇒ Object (readonly)
Returns the value of attribute held_item.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def held_item @held_item end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def item @item end |
#known_move ⇒ Object (readonly)
Returns the value of attribute known_move.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def known_move @known_move end |
#known_move_type ⇒ Object (readonly)
Returns the value of attribute known_move_type.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def known_move_type @known_move_type end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def location @location end |
#min_affection ⇒ Object (readonly)
Returns the value of attribute min_affection.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def min_affection @min_affection end |
#min_beauty ⇒ Object (readonly)
Returns the value of attribute min_beauty.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def min_beauty @min_beauty end |
#min_happiness ⇒ Object (readonly)
Returns the value of attribute min_happiness.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def min_happiness @min_happiness end |
#min_level ⇒ Object (readonly)
Returns the value of attribute min_level.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def min_level @min_level end |
#needs_overworld_rain ⇒ Object (readonly)
Returns the value of attribute needs_overworld_rain.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def needs_overworld_rain @needs_overworld_rain end |
#party_species ⇒ Object (readonly)
Returns the value of attribute party_species.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def party_species @party_species end |
#party_type ⇒ Object (readonly)
Returns the value of attribute party_type.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def party_type @party_type end |
#relative_physical_stats ⇒ Object (readonly)
Returns the value of attribute relative_physical_stats.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def relative_physical_stats @relative_physical_stats end |
#time_of_day ⇒ Object (readonly)
Returns the value of attribute time_of_day.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def time_of_day @time_of_day end |
#trade_species ⇒ Object (readonly)
Returns the value of attribute trade_species.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def trade_species @trade_species end |
#trigger ⇒ Object (readonly)
Returns the value of attribute trigger.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def trigger @trigger end |
#turn_upside_down ⇒ Object (readonly)
Returns the value of attribute turn_upside_down.
7 8 9 |
# File 'lib/poke_api/evolution_chain/evolution_detail.rb', line 7 def turn_upside_down @turn_upside_down end |