renegado()   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
# encoding: UTF-8
2
3 1 View Code Duplication
def renegados
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
4
  total_renegados = Dir['./data/renegados/*'].length
5
  [*0..(total_renegados - 1)].map do |i|
6
    r = load_yaml("/renegados/#{i}")
7
    r['nivel'] = 1 unless r['nivel']
8
    r['ciudad'] = 'Revenge' unless r['ciudad']
9
    r['id'] = i
10
    Renegado.new(r)
11
  end
12
end
13
14 1
def renegado(id)
15
  renegados[id]
16
end
17