gemas()   A
last analyzed

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
# Item diccionaries
2 1
%w(armas armaduras miscelaneas proteccions abalorios enchants).each do |item|
3 6
  define_method(item.to_sym) { load_yaml("items/#{item}") }
4
end
5
6 1
%w(piezas pociones pergaminos materiales).each do |util|
7 4
  define_method(util) { load_yaml("items/utiles/#{util}") }
8
end
9
10 1
def categorías # Armas
0 ignored issues
show
coding-style introduced by
Use only ascii symbols in identifiers.
Loading history...
Coding Style introduced by
Your coding style requires you to use snake_case for method names. That is all lowercase with underscores to seperate words.
Loading history...
11
  armas.map { |a| a['categoria'] }.uniq
12
end
13
14 1
def gema_calidades
15
  load_yaml('items/engarces/calibres')
16
end
17
18 1
def gemas
19
  load_yaml('items/engarces/gemas').map { |g| Gema.new(g) }
20
end
21
22 1
def joyas
23
  load_yaml('items/engarces/joyas').map { |g| Joya.new(g) }
24
end
25
26 1
def runas
27
  load_yaml('items/engarces/runas').map { |g| Runa.new(g) }
28
end
29
30 1
def tiers
31
  load_yaml('items/engarces/tiers')
32
end
33
34
# Libro malvado del Tarot
35 1
def tarot
36
  load_yaml('items/tarot')
37
end
38