battle_pet 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/battle_pet/ability.rb +12 -7
- metadata +2 -2
data/lib/battle_pet/ability.rb
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
class BattlePet::Ability
|
2
|
-
attr_accessor :id, :name, :type, :cooldown, :rounds
|
2
|
+
attr_accessor :id, :name, :icon ,:type, :cooldown, :rounds
|
3
3
|
|
4
|
-
def initialize(
|
5
|
-
@id =
|
6
|
-
@name =
|
7
|
-
@
|
8
|
-
@
|
9
|
-
@
|
4
|
+
def initialize(data)
|
5
|
+
@id = data["id"]
|
6
|
+
@name = data["name"]
|
7
|
+
@icon = data["icon"]
|
8
|
+
@type = BattlePet::Type.find(data["petTypeId"])
|
9
|
+
@cooldown = data["cooldown"]
|
10
|
+
@rounds = data["rounds"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def icon_url
|
14
|
+
"http://media.blizzard.com/wow/icons/56/#{icon}.jpg"
|
10
15
|
end
|
11
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: battle_pet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple gem to get data from WoW BattlePet API
|
15
15
|
email: zwt315@163.com
|