Hab   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 54.55%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 6
cts 11
cp 0.5455
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A type() 0 3 1
A initialize() 0 5 1
A nivel() 0 3 1
A img_path() 0 3 1
1
# Solamente las habilidades base de nivel 1
2 1
class Hab < Hash
3 1
  attr_accessor :name, :description
4
5 1
  def initialize(args)
6
    args.each do |k, v|
7
      instance_variable_set("@#{k}".to_sym, v) unless v.nil?
8
    end
9
  end
10
11 1
  def type
12
    'base'
13
  end
14
15 1
  def nivel
16
    1
17
  end
18
19 1
  def img_path
20
    "/images/skills/base/#{name}.png"
21
  end
22
end
23