Class: PokeApi::LocationArea

Inherits:
NamedApiResource show all
Defined in:
lib/poke_api/location_area.rb,
lib/poke_api/location_area/pokemon_encounter.rb,
lib/poke_api/location_area/encounter_method_rate.rb,
lib/poke_api/location_area/encounter_method_rate/encounter_version_detail.rb

Overview

LocationArea object handling all data fetched from /location-area

Defined Under Namespace

Classes: EncounterMethodRate, PokemonEncounter

Instance Attribute Summary collapse

Attributes inherited from NamedApiResource

#id, #name, #url

Instance Method Summary collapse

Methods inherited from NamedApiResource

#get

Methods included from AssignmentHelpers

assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign

Constructor Details

#initialize(data) ⇒ LocationArea

Returns a new instance of LocationArea.



10
11
12
# File 'lib/poke_api/location_area.rb', line 10

def initialize(data)
  assign_data(data)
end

Instance Attribute Details

#encounter_method_ratesObject (readonly)

Returns the value of attribute encounter_method_rates.



4
5
6
# File 'lib/poke_api/location_area.rb', line 4

def encounter_method_rates
  @encounter_method_rates
end

#game_indexObject (readonly)

Returns the value of attribute game_index.



4
5
6
# File 'lib/poke_api/location_area.rb', line 4

def game_index
  @game_index
end

#locationObject (readonly)

Returns the value of attribute location.



4
5
6
# File 'lib/poke_api/location_area.rb', line 4

def location
  @location
end

#namesObject (readonly)

Returns the value of attribute names.



4
5
6
# File 'lib/poke_api/location_area.rb', line 4

def names
  @names
end

#pokemon_encountersObject (readonly)

Returns the value of attribute pokemon_encounters.



4
5
6
# File 'lib/poke_api/location_area.rb', line 4

def pokemon_encounters
  @pokemon_encounters
end