Class: PokeApi::LocationArea::EncounterMethodRate
- Inherits:
-
Object
- Object
- PokeApi::LocationArea::EncounterMethodRate
- Includes:
- AssignmentHelpers
- Defined in:
- lib/poke_api/location_area/encounter_method_rate.rb,
lib/poke_api/location_area/encounter_method_rate/encounter_version_detail.rb
Overview
EncounterMethodRate object handling encounter_method_rate data fetched from /location-area
Defined Under Namespace
Classes: EncounterVersionDetail
Instance Attribute Summary collapse
-
#encounter_method ⇒ Object
readonly
Returns the value of attribute encounter_method.
-
#version_details ⇒ Object
readonly
Returns the value of attribute version_details.
Instance Method Summary collapse
-
#initialize(data) ⇒ EncounterMethodRate
constructor
A new instance of EncounterMethodRate.
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ EncounterMethodRate
Returns a new instance of EncounterMethodRate.
10 11 12 13 14 15 16 |
# File 'lib/poke_api/location_area/encounter_method_rate.rb', line 10 def initialize(data) @encounter_method = PokeApi::EncounterMethod.new(data[:encounter_method]) @version_details = assign_list( data: data[:version_details], klass: EncounterVersionDetail ) end |
Instance Attribute Details
#encounter_method ⇒ Object (readonly)
Returns the value of attribute encounter_method.
7 8 9 |
# File 'lib/poke_api/location_area/encounter_method_rate.rb', line 7 def encounter_method @encounter_method end |
#version_details ⇒ Object (readonly)
Returns the value of attribute version_details.
7 8 9 |
# File 'lib/poke_api/location_area/encounter_method_rate.rb', line 7 def version_details @version_details end |