Class: Metro::SetupHandlers::MoveToGameDirectory
- Inherits:
-
Object
- Object
- Metro::SetupHandlers::MoveToGameDirectory
- Defined in:
- lib/setup_handlers/move_to_game_directory.rb
Overview
If the filename provide contains path information, then we need to move the current working directory into the root of the game directory. This is important because assets and other various paths are dependent on that being the location during execution.
Instance Method Summary collapse
Instance Method Details
#setup(options) ⇒ Object
15 16 17 18 19 |
# File 'lib/setup_handlers/move_to_game_directory.rb', line 15 def setup() filename = .filename game_directory = File.dirname(filename) Dir.chdir game_directory end |