Class: LolApi::Spell

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_spell) ⇒ Spell

Returns a new instance of Spell.



8
9
10
# File 'lib/lol_api/types/dtos/spell.rb', line 8

def initialize(raw_spell)
	@raw_spell = raw_spell
end

Instance Attribute Details

#raw_spellObject (readonly)

Returns the value of attribute raw_spell.



6
7
8
# File 'lib/lol_api/types/dtos/spell.rb', line 6

def raw_spell
  @raw_spell
end

Instance Method Details

#alt_imagesObject



12
13
14
15
16
17
18
# File 'lib/lol_api/types/dtos/spell.rb', line 12

def alt_images
	if images = raw_spell['altimages']
		images.map do |item|
			Image.new(item)
		end
	end
end

#cooldownObject



20
21
22
# File 'lib/lol_api/types/dtos/spell.rb', line 20

def cooldown
	raw_spell['cooldown']
end

#cooldown_burnObject



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

def cooldown_burn
	raw_spell['cooldownBurn']
end

#costObject



28
29
30
# File 'lib/lol_api/types/dtos/spell.rb', line 28

def cost
	raw_spell['cost']
end

#cost_burnObject



32
33
34
# File 'lib/lol_api/types/dtos/spell.rb', line 32

def cost_burn 
	raw_spell['costBurn']
end

#cost_typeObject



36
37
38
# File 'lib/lol_api/types/dtos/spell.rb', line 36

def cost_type
	raw_spell['costType']
end

#descriptionObject



40
41
42
# File 'lib/lol_api/types/dtos/spell.rb', line 40

def description
	raw_spell['description']
end

#effectObject



44
45
46
# File 'lib/lol_api/types/dtos/spell.rb', line 44

def effect
	raw_spell['effect']
end

#effect_burnObject



48
49
50
# File 'lib/lol_api/types/dtos/spell.rb', line 48

def effect_burn
	raw_spell['effectBurn']
end

#imageObject



52
53
54
# File 'lib/lol_api/types/dtos/spell.rb', line 52

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

#keyObject



56
57
58
# File 'lib/lol_api/types/dtos/spell.rb', line 56

def key
	raw_spell['key']
end

#level_tipObject



60
61
62
# File 'lib/lol_api/types/dtos/spell.rb', line 60

def level_tip
	raw_spell['leveltip']
end

#max_rankObject



64
65
66
# File 'lib/lol_api/types/dtos/spell.rb', line 64

def max_rank
	raw_spell['max_rank']
end

#nameObject



67
68
69
# File 'lib/lol_api/types/dtos/spell.rb', line 67

def name
	raw_spell['name']
end

#rangeObject



71
72
73
# File 'lib/lol_api/types/dtos/spell.rb', line 71

def range 
	raw_spell['range']
end

#range_burnObject



75
76
77
# File 'lib/lol_api/types/dtos/spell.rb', line 75

def range_burn
	raw_spell['rangeBurn']
end

#resourceObject



78
79
80
# File 'lib/lol_api/types/dtos/spell.rb', line 78

def resource
	raw_spell['resource']
end

#sanitized_descriptionObject



82
83
84
# File 'lib/lol_api/types/dtos/spell.rb', line 82

def sanitized_description
	raw_spell['sanitized_description']
end

#sanitized_tooltipObject



86
87
88
# File 'lib/lol_api/types/dtos/spell.rb', line 86

def sanitized_tooltip
	raw_spell['sanitized_tooltip']
end

#tooltipObject



90
91
92
# File 'lib/lol_api/types/dtos/spell.rb', line 90

def tooltip
	raw_spell['tooltip']
end

#varsObject



94
95
96
# File 'lib/lol_api/types/dtos/spell.rb', line 94

def vars
	raw_spell['vars']
end