initial commit

This commit is contained in:
danijoo
2013-12-13 09:10:40 +01:00
commit 16f738c060
10 changed files with 641 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
class MasteryBook
attr_accessor :pages, :summonerId
def initialize(data)
@summonerId = data['summonerId']
@pages = []
data['pages'].each do |page|
@pages << MasteryPage.new(page)
end
end
end
class MasteryPage
attr_accessor :id, :talents, :name, :current
def initialize(data)
@id = data['id']
@name = data['name']
@current = data['current']
@talents = []
data['talents'].each do |talent|
@talents << Talent.new(talent)
end
end
end
class Talent
attr_accessor :id,:rank, :name
def initialize(data)
@id = data['id']
@name = data['name']
@rank = data['rank']
end
end