| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # frozen_string_literal: true |
||
| 4 | class Montura < Hash |
||
| 5 | attr_accessor :id, :name, :recorrido, :distancia, :bono, :precio |
||
| 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 | |||
| 13 | def img_path |
||
| 14 | "/images/monturas/#{name}.png" |
||
| 15 | end |
||
| 16 | end |
||
| 17 | |||
| 26 |