Class: OS

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

Instance Method Summary collapse

Instance Method Details

#command(command) ⇒ Object



47
48
49
# File 'lib/jeigem.rb', line 47

def command(command)
  return `#{command}`
end

#infoObject



58
59
60
61
# File 'lib/jeigem.rb', line 58

def info()
  os = Gem::Platform.local.os
  return "Windows" if os == "mingw32"
end

#up?(ip) ⇒ Boolean

Returns:

  • (Boolean)


50
51
52
53
54
55
56
57
# File 'lib/jeigem.rb', line 50

def up?(ip)
  `ping #{ip}`
  if ($?.exitstatus == 0) then
    return true
  else
    return false
  end
end