| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Coverage | 57.14% |
| Changes | 0 | ||
| 1 | # Define la montura de un heroe. Le permite entrar sin problemas al dungeon. |
||
| 2 | 1 | class Montura < Hash |
|
| 3 | 1 | attr_accessor :id, :name, :recorrido, :distancia, :bono, :precio |
|
| 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 img_path |
|
| 12 | "'../../images/monturas/#{name}.png'" |
||
| 13 | end |
||
| 14 | end |
||
| 15 | |||
| 24 |