pokemongodb 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pokemongodb/location.rb +13 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f0863f93b1398d9d47aaea22b51bf404bea89bc
4
- data.tar.gz: cc6df086b17cadb368cb52eb21ce61af9b6c7dfa
3
+ metadata.gz: 61ae9f2893175efdc77d773fd8995db0d7008f15
4
+ data.tar.gz: cfc607d3b0c16d5b8a37eac9e0432bea534991da
5
5
  SHA512:
6
- metadata.gz: f8ae8703f7684bc668e96294b5cde9d7c166a5a49c883b0e815c24e9185a33ed7a79b2eb1d8a7e18afa618331462bb5feda42c83480afe07e1c2bb27f484d2d4
7
- data.tar.gz: 651bcfc694edcebac18115ce63873f21535d9ef34edb0818470181406a76dfe0fb570d5d3d4a1f95b2e1fadf08346f1424c139dada986463fbb5174c5c5817d9
6
+ metadata.gz: 3d967594f7a7956e2702d2e470955c8ec53304ec1f4185ea6ded55a56a2d3686b16e690e3ba6b2cb677f2b724f39f541b15ac0777e8baba0b953e4d6e4638156
7
+ data.tar.gz: f6316d6934cbcbf36df8f1df71dd1797d147788e4d18641689ea9d4321b8c9a567d8628f0607f62aa514f27bd31005f8f6b466e92e5f3e818f7cc90abd47a500
@@ -60,6 +60,19 @@ class Pokemongodb
60
60
  Location::Woodland,
61
61
  ]
62
62
  end
63
+
64
+ # Returns array of pokemon who can use the move
65
+ #
66
+ # Example:
67
+ # >> Pokemongodb::Location::Beach.available_pokemon
68
+ # => [Pokemongodb::Pokemon::Arcanine, Pokemongodb::Pokemon::Charizard... ]
69
+ def self.available_pokemon
70
+ pokemon_at_location = []
71
+ self.types.each do |type|
72
+ pokemon_at_location += Pokemongodb::Pokemon.find_by_type(type)
73
+ end
74
+ pokemon_at_location.uniq
75
+ end
63
76
  end
64
77
  end
65
78
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pokemongodb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TeoUCSB82