smogon 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGZjMTQ0NjJmMzc5YjBkOGVhODA3YmY0OTA0ZWNhMzZkZjU1Yjg1Zg==
4
+ ZmQ0ZDY0NjQ5MjA3NzJiMzlhZmQ1Nzc4MzE5Yjc2MmI1ZTVjOWFiNg==
5
5
  data.tar.gz: !binary |-
6
- NThkYWUwZjQzMGQyYjI5ZGY4ZGQ2MjdlYTU3NTMwNGU1YTA2NGZkYg==
6
+ ZDA1OTkwNzFlZDM4MWZkZDYyMmU0MThmMmM0Zjg2ODI3MTFiOGJlYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDVlY2NhYTUyYmYzM2M3NzZjYjlmNTQxOGIzNWUzZTM2ZTE2YzY4MzA2NWI0
10
- YzMxMjIyYzI3MTdhZGRjNDI1NjkxYjg4NzhlYjAyODExOWZkMzEzZjU3ODg5
11
- MTYxZTA5ZGFlZTZhMWE4NTk5MTY2NjJkMThmNzk5Mjg5NWU5OTA=
9
+ Njk3YjA0Y2UwY2E0MjYzZDk4Nzc4OGQ0OWJkMjYwYWI3OTllODMyMDhhMTU3
10
+ M2YzOGE1MzUwN2Q3MTFmMWQzZjA4ZjFjNmU2YzMwZGE1OGU0NjNjZGFmMzRi
11
+ M2U5YzQ3OTgwMTA3MDllNGI3OTY3MzVmYTU2NDU1NTZjZGFiNjQ=
12
12
  data.tar.gz: !binary |-
13
- NGQ2ZDI2MDUzYTJlZmQ5YzU2NDk5Y2I4ZTM1YmU0OTMwNmViYTIyNGY4NjA4
14
- OTU2OTkzMDIzZGExMzdiMTU3ZWE1NDNkNjYzMDI1YTcwZDk2MGY2NDM4MDI3
15
- NDMzMzIxNGIxMDMxYzUzNWVhNWUyOWIxODc4ZjQ2YzA2NDNmMTI=
13
+ MWM3NmQ0MWY4ZDQ2YmViNmIxZjY4MWIzOWNhZjUxMTFiMjJmMTk1YmY4Yzk3
14
+ NTg4NzhlMTRmMTlmZTJmNTVjNzE4MTZlNzEyMGI0YzQ2MjE0YzE5MWRkNDMx
15
+ MGExMmU0Y2E0YWFiNGYyYWQxMWRhNDViYWE1YWFhNTZkZGQ4NDQ=
@@ -21,7 +21,7 @@ module Smogon
21
21
  class Abilitydex
22
22
  def self.get(name)
23
23
  begin
24
- name.downcase.gsub!(/\s/, ?_)
24
+ name = name.downcase.gsub!(/\s/, ?_)
25
25
  url = URI::encode "http://www.smogon.com/bw/abilities/#{name}"
26
26
 
27
27
  smogon = Nokogiri::HTML(open(url))
@@ -0,0 +1,30 @@
1
+ #encoding: utf-8
2
+ #--
3
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
4
+ #
5
+ # This file is part of Smogon-API.
6
+ #
7
+ # Smogon-API is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # Smogon-API is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with Smogon-API. If not, see <http://www.gnu.org/licenses/>.
19
+ #++
20
+
21
+ module Smogon
22
+ class Moveset
23
+ attr_accessor :pokemon, :name, :tier, :item, :ability, :nature, :moves, :evs
24
+
25
+ def to_s
26
+ "Pokémon: #{pokemon}\nSet: #{name}\nItem: #{item.join(' / ')}\nAbility: #{ability.join(' / ')}\nNature: #{nature.join(' / ')}\nMoves: #{''.tap { |s| moves.each { |move| s << move.join(' / ') + ', '}}[0..-3]}\nEVs: #{evs}"
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ #--
2
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
3
+ #
4
+ # This file is part of Smogon-API.
5
+ #
6
+ # Smogon-API is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Smogon-API is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with Smogon-API. If not, see <http://www.gnu.org/licenses/>.
18
+ #++
19
+
20
+ module Smogon
21
+ class Pokemon
22
+ attr_accessor :name, :_name, :types, :tier, :abilities, :base_stats
23
+
24
+ def to_s
25
+ "Name: #{name}\nAbility: #{abilities.join(', ')}\nType: #{types.join(?/)}\nTier: #{tier}\nBase stats: #{base_stats.join(?/)}"
26
+ end
27
+ end
28
+ end
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Smogon
21
21
  def self.version
22
- '0.2'
22
+ '0.2.1'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smogon
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
@@ -32,14 +32,17 @@ extra_rdoc_files: []
32
32
  files:
33
33
  - lib/smogon/abilitydex.rb
34
34
  - lib/smogon/movedex.rb
35
+ - lib/smogon/moveset.rb
35
36
  - lib/smogon/pokedex.rb
37
+ - lib/smogon/pokemon.rb
36
38
  - lib/smogon/types/ability.rb
37
39
  - lib/smogon/types/moveset.rb
38
40
  - lib/smogon/types/pokemon.rb
39
41
  - lib/smogon/version.rb
40
42
  - lib/smogon.rb
41
43
  homepage: http://www.giovannicapuano.net
42
- licenses: []
44
+ licenses:
45
+ - GPL-3
43
46
  metadata: {}
44
47
  post_install_message:
45
48
  rdoc_options: []