Class: LolApi::MasteryPage
- Inherits:
-
Object
- Object
- LolApi::MasteryPage
- Defined in:
- lib/lol_api/types/summoner_masteries.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) ⇒ MasteryPage
constructor
A new instance of MasteryPage.
- #masteries ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(raw_page) ⇒ MasteryPage
Returns a new instance of MasteryPage.
26 27 28 |
# File 'lib/lol_api/types/summoner_masteries.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_masteries.rb', line 24 def raw_page @raw_page end |
Instance Method Details
#current ⇒ Object
30 31 32 |
# File 'lib/lol_api/types/summoner_masteries.rb', line 30 def current raw_page['current'] end |
#id ⇒ Object
34 35 36 |
# File 'lib/lol_api/types/summoner_masteries.rb', line 34 def id raw_page['id'] end |
#masteries ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/lol_api/types/summoner_masteries.rb', line 38 def masteries if masteries = raw_page['masteries'] masteries.map do |mastery| MasteryItem.new(mastery) end end end |
#name ⇒ Object
46 47 48 |
# File 'lib/lol_api/types/summoner_masteries.rb', line 46 def name raw_page['name'] end |