Class: LolApi::Mastery

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_masteryObject (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

#descriptionObject



19
20
21
# File 'lib/lol_api/types/mastery.rb', line 19

def description
	raw_mastery['description']
end

#idObject



11
12
13
# File 'lib/lol_api/types/mastery.rb', line 11

def id 
	raw_mastery['id']
end

#imageObject



27
28
29
# File 'lib/lol_api/types/mastery.rb', line 27

def image
	Image.new(raw_mastery['image']) if raw_mastery['image']
end

#nameObject



15
16
17
# File 'lib/lol_api/types/mastery.rb', line 15

def name 
	raw_mastery['name']
end

#prereqObject



35
36
37
# File 'lib/lol_api/types/mastery.rb', line 35

def prereq
	raw_mastery['prereq'].to_i
end

#ranksObject



31
32
33
# File 'lib/lol_api/types/mastery.rb', line 31

def ranks
	raw_mastery['ranks']
end

#sanitized_descriptionObject



23
24
25
# File 'lib/lol_api/types/mastery.rb', line 23

def sanitized_description
	raw_mastery['sanitizedDescription']
end