Class: GameTemplate
- Inherits:
-
Object
- Object
- GameTemplate
- Defined in:
- lib/game_template.rb
Instance Method Summary collapse
-
#initialize(game, remote = "") ⇒ GameTemplate
constructor
A new instance of GameTemplate.
- #install(install_path, steam_login) ⇒ Object
- #run(install_path) ⇒ Object
Constructor Details
#initialize(game, remote = "") ⇒ GameTemplate
Returns a new instance of GameTemplate.
7 8 9 10 |
# File 'lib/game_template.rb', line 7 def initialize(game, remote = "") @game = game @remote = remote end |
Instance Method Details
#install(install_path, steam_login) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/game_template.rb', line 16 def install(install_path, steam_login) if @game.app_id.nil? @game.install_server(install_path) else install_steam_server(install_path, steam_login) end @game.post_install(install_path) if defined? @game.post_install create_unit_file(install_path) end |
#run(install_path) ⇒ Object
12 13 14 |
# File 'lib/game_template.rb', line 12 def run(install_path) exec(@game.launch(install_path)) end |