Module: Helpers

Defined in:
lib/helpers.rb

Class Method Summary collapse

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

Returns:

  • (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