Class: LolApi::Mastery
- Inherits:
-
Object
- Object
- LolApi::Mastery
- Defined in:
- lib/lol_api/types/mastery.rb
Instance Attribute Summary collapse
-
#raw_mastery ⇒ Object
readonly
Returns the value of attribute raw_mastery.
Instance Method Summary collapse
- #description ⇒ Object
- #id ⇒ Object
- #image ⇒ Object
-
#initialize(raw_mastery) ⇒ Mastery
constructor
A new instance of Mastery.
- #name ⇒ Object
- #prereq ⇒ Object
- #ranks ⇒ Object
- #sanitized_description ⇒ Object
Constructor Details
#initialize(raw_mastery) ⇒ Mastery
Returns a new instance of Mastery.
7 8 9 |
# File 'lib/lol_api/types/mastery.rb', line 7 def initialize(raw_mastery) @raw_mastery = raw_mastery end |
Instance Attribute Details
#raw_mastery ⇒ Object (readonly)
Returns the value of attribute raw_mastery.
5 6 7 |
# File 'lib/lol_api/types/mastery.rb', line 5 def raw_mastery @raw_mastery end |
Instance Method Details
#description ⇒ Object
19 20 21 |
# File 'lib/lol_api/types/mastery.rb', line 19 def description raw_mastery['description'] end |
#id ⇒ Object
11 12 13 |
# File 'lib/lol_api/types/mastery.rb', line 11 def id raw_mastery['id'] end |
#image ⇒ Object
27 28 29 |
# File 'lib/lol_api/types/mastery.rb', line 27 def image Image.new(raw_mastery['image']) if raw_mastery['image'] end |
#name ⇒ Object
15 16 17 |
# File 'lib/lol_api/types/mastery.rb', line 15 def name raw_mastery['name'] end |
#prereq ⇒ Object
35 36 37 |
# File 'lib/lol_api/types/mastery.rb', line 35 def prereq raw_mastery['prereq'].to_i end |
#ranks ⇒ Object
31 32 33 |
# File 'lib/lol_api/types/mastery.rb', line 31 def ranks raw_mastery['ranks'] end |
#sanitized_description ⇒ Object
23 24 25 |
# File 'lib/lol_api/types/mastery.rb', line 23 def sanitized_description raw_mastery['sanitizedDescription'] end |