class Pokemongodb::Location
Public Class Methods
all()
click to toggle source
Returns array of all available locations.
Example:
>> Pokemongodb::Location.all => []
# File lib/pokemongodb/location.rb, line 9 def self.all [ Location::AridClimate, Location::Basin, Location::Beach, Location::Canal, Location::Cemetary, Location::Church, Location::City, Location::CollegeCampus, Location::Dock, Location::Farmland, Location::Forest, Location::Garden, Location::Glacier, Location::GolfCourse, Location::GrassyArea, Location::Gym, Location::Harbor, Location::HikingTrail, Location::Hospital, Location::IndustrialArea, Location::IndustrialPark, Location::Lake, Location::Landmark, Location::Library, Location::Marsh, Location::Meadow, Location::Mountain, Location::NatureReserve, Location::Neighborhood, Location::Ocean, Location::Park, Location::ParkingLot, Location::Port, Location::Quarry, Location::Railway, Location::RecreationArea, Location::Reservoir, Location::Residential, Location::River, Location::Riverbank, Location::School, Location::ShoppingCenter, Location::SkiResort, Location::SportsCenter, Location::Stadium, Location::Stream, Location::University, Location::WarmClimate, Location::Wetland, Location::Woodland, ] end
available_pokemon()
click to toggle source
Returns array of pokemon who can use the move
Example:
>> Pokemongodb::Location::Beach.available_pokemon => [Pokemongodb::Pokemon::Arcanine, Pokemongodb::Pokemon::Charizard... ]
# File lib/pokemongodb/location.rb, line 69 def self.available_pokemon pokemon_at_location = [] self.types.each do |type| pokemon_at_location += Pokemongodb::Pokemon.find_by_type(type) end pokemon_at_location.uniq end