Module: Helpers
- Defined in:
- lib/helpers.rb
Class Method Summary collapse
- .remote_cmd(connection, command) ⇒ Object
- .steamcmd_exists?(path = "/usr/games/steamcmd", binary = "steamcmd") ⇒ Boolean
Class Method Details
.remote_cmd(connection, command) ⇒ Object
4 5 6 |
# File 'lib/helpers.rb', line 4 def self.remote_cmd(connection, command) system("ssh #{connection} '#{command}'") end |
.steamcmd_exists?(path = "/usr/games/steamcmd", binary = "steamcmd") ⇒ Boolean
8 9 10 11 12 13 14 15 16 |
# File 'lib/helpers.rb', line 8 def self.steamcmd_exists?(path = "/usr/games/steamcmd", binary = "steamcmd") if system("stat #{path}") true elsif system("which #{binary}") true else false end end |