Class: Console::Libvirt
- Inherits:
-
Object
- Object
- Console::Libvirt
- Defined in:
- lib/console/libvirt.rb
Instance Method Summary collapse
-
#initialize(path = PTS_PATH) ⇒ Libvirt
constructor
A new instance of Libvirt.
- #libvirt_pts ⇒ Object
Constructor Details
#initialize(path = PTS_PATH) ⇒ Libvirt
Returns a new instance of Libvirt.
10 11 12 |
# File 'lib/console/libvirt.rb', line 10 def initialize(path=PTS_PATH) @pts_path=path end |
Instance Method Details
#libvirt_pts ⇒ Object
14 15 16 17 18 19 |
# File 'lib/console/libvirt.rb', line 14 def libvirt_pts Dir.entries(@pts_path).find_all do |pts| uid = File.stat("#{@pts_path}/#{pts}").uid Etc.getpwuid(uid).name.eql?(LIBVIRT_USER) end end |