Class: Sightstone::MasteryBook

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/masterybook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ MasteryBook

Returns a new instance of MasteryBook.



8
9
10
11
12
13
14
15
16
# File 'lib/sightstone/masterybook.rb', line 8

def initialize(data)
  @summonerId = data['summonerId']
  @pages = []
  if(data.has_key? 'pages')
    data['pages'].each do |page|
      @pages << MasteryPage.new(page)
    end
  end
end

Instance Attribute Details

#pagesArray<MasteryPage>

of the masterybook

Returns:



5
6
7
# File 'lib/sightstone/masterybook.rb', line 5

def pages
  @pages
end

#summonerIdObject

Returns the value of attribute summonerId.



6
7
8
# File 'lib/sightstone/masterybook.rb', line 6

def summonerId
  @summonerId
end