Class: GameTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/game_template.rb

Instance Method Summary collapse

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, )
  if @game.app_id.nil?
    @game.install_server(install_path)
  else
    install_steam_server(install_path, )
  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