Reto   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 5 1
1
# frozen_string_literal: true
2
3
# Clase para aventuras
4
class Reto < Hash
5
  attr_accessor :id, :name, :pjs, :pnjs, :desc, :reward, :target, :type
6
7
  def initialize(args)
8
    args.each do |k, v|
9
      instance_variable_set("@#{k}".to_sym, v) unless v.nil?
10
    end
11
  end
12
end
13