Class: Sightstone::RuneBook

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ RuneBook

Returns a new instance of RuneBook.



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

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

Instance Attribute Details

#pagesArray<RunePage>

of the runebook

Returns:

  • (Array<RunePage>)

    the current value of pages



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

def pages
  @pages
end

#summonerIdObject

Returns the value of attribute summonerId.



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

def summonerId
  @summonerId
end