250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
# File 'lib/manasimu/card.rb', line 250
def symbols
return @symbols if @symbols
@symbols = []
mana_cost[1..-2].split('}{').each_with_index do |mana, j|
spell_colors = mana.split('/')
if spell_colors.length == 1
spell_color = spell_colors[0]
if spell_color.to_i.to_s == spell_color
spell_color.to_i.times do |k|
@symbols << "1"
end
else
@symbols << spell_color
end
else
throw Exception.new('unprogramed exception')
end
end
@symbols
end
|