Class: SDC::MapConfig
- Inherits:
-
Object
- Object
- SDC::MapConfig
- Defined in:
- lib/core/MapConfig.rb
Instance Attribute Summary collapse
-
#map_name ⇒ Object
readonly
Returns the value of attribute map_name.
-
#tileset_index ⇒ Object
Returns the value of attribute tileset_index.
Instance Method Summary collapse
-
#initialize(map_name) ⇒ MapConfig
constructor
A new instance of MapConfig.
- #run_script ⇒ Object
-
#script(&block) ⇒ Object
TODO: Could be extended for multiple pages.
Constructor Details
#initialize(map_name) ⇒ MapConfig
Returns a new instance of MapConfig.
7 8 9 10 |
# File 'lib/core/MapConfig.rb', line 7 def initialize(map_name) @map_name = map_name @script = nil end |
Instance Attribute Details
#map_name ⇒ Object (readonly)
Returns the value of attribute map_name.
4 5 6 |
# File 'lib/core/MapConfig.rb', line 4 def map_name @map_name end |
#tileset_index ⇒ Object
Returns the value of attribute tileset_index.
5 6 7 |
# File 'lib/core/MapConfig.rb', line 5 def tileset_index @tileset_index end |
Instance Method Details
#run_script ⇒ Object
18 19 20 |
# File 'lib/core/MapConfig.rb', line 18 def run_script @script&.call end |
#script(&block) ⇒ Object
TODO: Could be extended for multiple pages
14 15 16 |
# File 'lib/core/MapConfig.rb', line 14 def script(&block) @script = block end |