Class: Modsvaskr::Game
- Inherits:
-
Object
- Object
- Modsvaskr::Game
- Defined in:
- lib/modsvaskr/game.rb
Overview
Common functionality for any Game
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(config, game_info) ⇒ Game
constructor
Constructor.
-
#launch_exe ⇒ Object
Return the launch executable.
-
#name ⇒ Object
Return the game name.
-
#path ⇒ Object
Return the game path.
-
#xedit ⇒ Object
Return an xEdit instance for this game.
Methods included from Logger
Methods included from RunCmd
Constructor Details
#initialize(config, game_info) ⇒ Game
Constructor
- Parameters
-
config (Config): The config
-
game_info (Hash<String,Object>): Game info:
-
name (String): Game name
-
path (String): Game installation dir
-
19 20 21 22 23 24 |
# File 'lib/modsvaskr/game.rb', line 19 def initialize(config, game_info) @config = config @game_info = game_info @name = name init if self.respond_to?(:init) end |
Instance Method Details
#launch_exe ⇒ Object
Return the launch executable
- Result
-
String: Launch executable
46 47 48 |
# File 'lib/modsvaskr/game.rb', line 46 def launch_exe @game_info['launch_exe'] end |
#name ⇒ Object
Return the game name
- Result
-
String: Game name
30 31 32 |
# File 'lib/modsvaskr/game.rb', line 30 def name @game_info['name'] end |
#path ⇒ Object
Return the game path
- Result
-
String: Game path
38 39 40 |
# File 'lib/modsvaskr/game.rb', line 38 def path @game_info['path'] end |