fixed exception for games without fellows

This commit is contained in:
danijoo
2014-01-05 15:31:01 +01:00
parent f526accb8b
commit bc1a75d53a
2 changed files with 4 additions and 2 deletions

View File

@@ -37,9 +37,11 @@ class HistoryGame
@createDate=data['createDate'] @createDate=data['createDate']
@createDateString=data['createDateString'] @createDateString=data['createDateString']
@fellowPlayers=[] @fellowPlayers=[]
if(data.has_key? "fellowPlayers")
data['fellowPlayers'].each do |player| data['fellowPlayers'].each do |player|
@fellowPlayers << Player.new(player) @fellowPlayers << Player.new(player)
end end
end
@gameId=data['gameId'] @gameId=data['gameId']
@gameMode=data['gameMode'] @gameMode=data['gameMode']
@gameType=data['gameType'] @gameType=data['gameType']

View File

@@ -1,7 +1,7 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = 'sightstone' s.name = 'sightstone'
s.version = '1.1.0' s.version = '1.1.1'
s.date = '2014-01-01' s.date = '2014-01-05'
s.summary = 'Ruby wrapper for riots league of legends api' s.summary = 'Ruby wrapper for riots league of legends api'
s.description = s.summary s.description = s.summary
s.authors = ["Daniel Bauer"] s.authors = ["Daniel Bauer"]