Class: LolApi::RunePage

Inherits:
Object
  • Object
show all
Defined in:
lib/lol_api/types/summoner_runes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_page) ⇒ RunePage

Returns a new instance of RunePage.



26
27
28
# File 'lib/lol_api/types/summoner_runes.rb', line 26

def initialize(raw_page)
	@raw_page = raw_page
end

Instance Attribute Details

#raw_pageObject (readonly)

Returns the value of attribute raw_page.



24
25
26
# File 'lib/lol_api/types/summoner_runes.rb', line 24

def raw_page
  @raw_page
end

Instance Method Details

#currentObject



30
31
32
# File 'lib/lol_api/types/summoner_runes.rb', line 30

def current 
	raw_page['current']
end

#idObject



34
35
36
# File 'lib/lol_api/types/summoner_runes.rb', line 34

def id 
	raw_page['id']
end

#nameObject



38
39
40
# File 'lib/lol_api/types/summoner_runes.rb', line 38

def name
	raw_page['name']
end

#runesObject



42
43
44
45
46
47
48
# File 'lib/lol_api/types/summoner_runes.rb', line 42

def runes
	if runes = raw_page['slots']
		runes.map do |s|
			SlottedRune.new(s)
		end
	end
end