Class: Terrain

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/terrain.rb

Overview

This class describes a terrain.

Instance Method Summary (collapse)

Instance Method Details

- (String) img_file

Return the image file name which is created from symbol and prefix. File extension is added on erb of views.

Returns:

  • (String)


17
18
19
# File 'app/models/terrain.rb', line 17

def img_file
  return "map_" + symbol.to_s + "_full"
end

- (String) img_file_white

Return the white out image file name which is created from img_file and suffix. File extension is added on erb of views.

Returns:

  • (String)


24
25
26
# File 'app/models/terrain.rb', line 24

def img_file_white
  return img_file + "_white"
end