Pergamino.name()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
# frozen_string_literal: true
2
3
# Tipos de pergamino
4
# TODO: Mapear los hechizos
5
class Pergamino < Util
6
  def name
7
    pergamino(id)['name']
8
  end
9
10
  def precio
11
    pergamino(id)['precio']
12
  end
13
14
  # Max num. permitido
15
  def max
16
    pergamino(id)['hechizos']
17
  end
18
19
  def hechizos
20
    spells.map { |s| Elemental.new(id: s).name }
21
  end
22
end
23