Class: LolApi::RunePage
- Inherits:
-
Object
- Object
- LolApi::RunePage
- Defined in:
- lib/lol_api/types/summoner_runes.rb
Instance Attribute Summary collapse
-
#raw_page ⇒ Object
readonly
Returns the value of attribute raw_page.
Instance Method Summary collapse
- #current ⇒ Object
- #id ⇒ Object
-
#initialize(raw_page) ⇒ RunePage
constructor
A new instance of RunePage.
- #name ⇒ Object
- #runes ⇒ Object
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_page ⇒ Object (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
#current ⇒ Object
30 31 32 |
# File 'lib/lol_api/types/summoner_runes.rb', line 30 def current raw_page['current'] end |
#id ⇒ Object
34 35 36 |
# File 'lib/lol_api/types/summoner_runes.rb', line 34 def id raw_page['id'] end |
#name ⇒ Object
38 39 40 |
# File 'lib/lol_api/types/summoner_runes.rb', line 38 def name raw_page['name'] end |
#runes ⇒ Object
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 |