model/hero.rb 1 location
|
@@ 72-78 (lines=7) @@
|
| 69 |
|
end |
| 70 |
|
|
| 71 |
|
# Default-ed meta-methods |
| 72 |
|
def armour |
| 73 |
|
case armadura.class.to_s |
| 74 |
|
when 'Fixnum' then Armadura.new(id: armadura) |
| 75 |
|
when 'Hash' then Armadura.new(armadura) |
| 76 |
|
else Armadura.new(id: 0) |
| 77 |
|
end |
| 78 |
|
end |
| 79 |
|
|
| 80 |
|
def get_weapon(weapon) # Analyze data structure |
| 81 |
|
case weapon.class.to_s |
model/renegado.rb 1 location
|
@@ 70-76 (lines=7) @@
|
| 67 |
|
end |
| 68 |
|
|
| 69 |
|
# Default-ed meta-methods |
| 70 |
|
def armour |
| 71 |
|
case armadura.class.to_s |
| 72 |
|
when 'Fixnum' then Armadura.new(id: armadura) |
| 73 |
|
when 'Hash' then Armadura.new(armadura) |
| 74 |
|
else Armadura.new(id: 0) |
| 75 |
|
end |
| 76 |
|
end |
| 77 |
|
|
| 78 |
|
def get_weapon(weapon) # Analyze data structure |
| 79 |
|
case weapon.class.to_s |