Class: LolApi::Spell
- Inherits:
-
Object
- Object
- LolApi::Spell
- Defined in:
- lib/lol_api/types/dtos/spell.rb
Instance Attribute Summary collapse
-
#raw_spell ⇒ Object
readonly
Returns the value of attribute raw_spell.
Instance Method Summary collapse
- #alt_images ⇒ Object
- #cooldown ⇒ Object
- #cooldown_burn ⇒ Object
- #cost ⇒ Object
- #cost_burn ⇒ Object
- #cost_type ⇒ Object
- #description ⇒ Object
- #effect ⇒ Object
- #effect_burn ⇒ Object
- #image ⇒ Object
-
#initialize(raw_spell) ⇒ Spell
constructor
A new instance of Spell.
- #key ⇒ Object
- #level_tip ⇒ Object
- #max_rank ⇒ Object
- #name ⇒ Object
- #range ⇒ Object
- #range_burn ⇒ Object
- #resource ⇒ Object
- #sanitized_description ⇒ Object
- #sanitized_tooltip ⇒ Object
- #tooltip ⇒ Object
- #vars ⇒ Object
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_spell ⇒ Object (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_images ⇒ Object
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 |
#cooldown ⇒ Object
20 21 22 |
# File 'lib/lol_api/types/dtos/spell.rb', line 20 def cooldown raw_spell['cooldown'] end |
#cooldown_burn ⇒ Object
24 25 26 |
# File 'lib/lol_api/types/dtos/spell.rb', line 24 def cooldown_burn raw_spell['cooldownBurn'] end |
#cost ⇒ Object
28 29 30 |
# File 'lib/lol_api/types/dtos/spell.rb', line 28 def cost raw_spell['cost'] end |
#cost_burn ⇒ Object
32 33 34 |
# File 'lib/lol_api/types/dtos/spell.rb', line 32 def cost_burn raw_spell['costBurn'] end |
#cost_type ⇒ Object
36 37 38 |
# File 'lib/lol_api/types/dtos/spell.rb', line 36 def cost_type raw_spell['costType'] end |
#description ⇒ Object
40 41 42 |
# File 'lib/lol_api/types/dtos/spell.rb', line 40 def description raw_spell['description'] end |
#effect ⇒ Object
44 45 46 |
# File 'lib/lol_api/types/dtos/spell.rb', line 44 def effect raw_spell['effect'] end |
#effect_burn ⇒ Object
48 49 50 |
# File 'lib/lol_api/types/dtos/spell.rb', line 48 def effect_burn raw_spell['effectBurn'] end |
#image ⇒ Object
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 |
#key ⇒ Object
56 57 58 |
# File 'lib/lol_api/types/dtos/spell.rb', line 56 def key raw_spell['key'] end |
#level_tip ⇒ Object
60 61 62 |
# File 'lib/lol_api/types/dtos/spell.rb', line 60 def level_tip raw_spell['leveltip'] end |
#max_rank ⇒ Object
64 65 66 |
# File 'lib/lol_api/types/dtos/spell.rb', line 64 def max_rank raw_spell['max_rank'] end |
#name ⇒ Object
67 68 69 |
# File 'lib/lol_api/types/dtos/spell.rb', line 67 def name raw_spell['name'] end |
#range ⇒ Object
71 72 73 |
# File 'lib/lol_api/types/dtos/spell.rb', line 71 def range raw_spell['range'] end |
#range_burn ⇒ Object
75 76 77 |
# File 'lib/lol_api/types/dtos/spell.rb', line 75 def range_burn raw_spell['rangeBurn'] end |
#resource ⇒ Object
78 79 80 |
# File 'lib/lol_api/types/dtos/spell.rb', line 78 def resource raw_spell['resource'] end |
#sanitized_description ⇒ Object
82 83 84 |
# File 'lib/lol_api/types/dtos/spell.rb', line 82 def sanitized_description raw_spell['sanitized_description'] end |
#sanitized_tooltip ⇒ Object
86 87 88 |
# File 'lib/lol_api/types/dtos/spell.rb', line 86 def sanitized_tooltip raw_spell['sanitized_tooltip'] end |
#tooltip ⇒ Object
90 91 92 |
# File 'lib/lol_api/types/dtos/spell.rb', line 90 def tooltip raw_spell['tooltip'] end |
#vars ⇒ Object
94 95 96 |
# File 'lib/lol_api/types/dtos/spell.rb', line 94 def vars raw_spell['vars'] end |