Completed
Push — master ( e7c489...9f5d8b )
by Borja
02:42
created

arena()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 3
ccs 1
cts 2
cp 0.5
crap 1.125
rs 10
c 0
b 0
f 0
1
# YAML DB Loader
2 1
def elficas
3
  load_yaml('magia/elficas').map   { |s| Elfica.new(s) }
4
end
5
6 1
def plegarias
7
  load_yaml('magia/plegarias').map { |s| Plegaria.new(s) }
8
end
9
10 1
def execraciones
11
  load_yaml('magia/execraciones').map { |s| Execracion.new(s) }
12
end
13
14 1
def sangres
15
  load_yaml('magia/sangres').map   { |s|    Sangre.new(s) }
16
end
17
18 1
def sombras
19
  load_yaml('magia/sombras').map   { |s|    Sombra.new(s) }
20
end
21
22 1
def arenas
23
  load_yaml('magia/arenas').map   { |s|    Arena.new(s) }
24
end
25
26 1
def hielos
27
  load_yaml('magia/hielos').map   { |s|    Hielo.new(s) }
28
end
29
30 1
def spells
31
  load_yaml('magia/spells').map { |s| Elemental.new(s) }
32
end
33
34
# TODO: tune up this!
35
# All find ID methods
36 1
def elfica(id)
37
  elficas[id]
38
end
39
40 1
def plegaria(id)
41
  plegarias[id]
42
end
43
44 1
def sangre(id)
45
  sangres[id]
46
end
47
48 1
def sombra(id)
49
  sombras[id]
50
end
51
52 1
def hielo(id)
53
  hielos[id]
54
end
55
56 1
def arena(id)
57
  arenas[id]
58
end
59
60 1
def spell(id)
61
  spells[id]
62
end
63