Class: PokeApi::Location
- Inherits:
-
NamedApiResource
- Object
- NamedApiResource
- PokeApi::Location
- Defined in:
- lib/poke_api/location.rb
Overview
Location object handling all data fetched from /location
Instance Attribute Summary collapse
-
#areas ⇒ Object
readonly
Returns the value of attribute areas.
-
#game_indices ⇒ Object
readonly
Returns the value of attribute game_indices.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Attributes inherited from NamedApiResource
Instance Method Summary collapse
-
#initialize(data) ⇒ Location
constructor
A new instance of Location.
Methods inherited from NamedApiResource
Methods included from AssignmentHelpers
assign_list, custom_endpoint_object, endpoint_assignment, get_named_api_resource_from_url, try_to_assign
Constructor Details
#initialize(data) ⇒ Location
Returns a new instance of Location.
9 10 11 |
# File 'lib/poke_api/location.rb', line 9 def initialize(data) assign_data(data) end |
Instance Attribute Details
#areas ⇒ Object (readonly)
Returns the value of attribute areas.
4 5 6 |
# File 'lib/poke_api/location.rb', line 4 def areas @areas end |
#game_indices ⇒ Object (readonly)
Returns the value of attribute game_indices.
4 5 6 |
# File 'lib/poke_api/location.rb', line 4 def game_indices @game_indices end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
4 5 6 |
# File 'lib/poke_api/location.rb', line 4 def names @names end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
4 5 6 |
# File 'lib/poke_api/location.rb', line 4 def region @region end |