Class: Mittsu::GenericLib::Linux
- Inherits:
-
Base
- Object
- Base
- Mittsu::GenericLib::Linux
show all
- Defined in:
- lib/mittsu/renderers/generic_lib.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.kernel_module_in_use ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 36
def kernel_module_in_use
lspci_line, stderr, _status = Open3.capture3("lspci -nnk | grep -i vga -A3 | grep 'in use'")
puts stderr if DEBUG
/in use:\s*(\S+)/ =~ lspci_line && $1
rescue
''
end
|
.ldconfig ⇒ Object
54
55
56
57
58
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 54
def ldconfig
`ldconfig -p | grep 'libGL\\.so'`.lines
rescue
[]
end
|
.libgl_paths ⇒ Object
44
45
46
47
48
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 44
def libgl_paths
Dir.glob('/usr/lib*/**/libGL.so*')
rescue
[]
end
|
.sixtyfour_bits? ⇒ Boolean
50
51
52
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 50
def sixtyfour_bits?
1.size == 8
end
|
Instance Method Details
#file ⇒ Object
30
31
32
33
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 30
def file
return nil if file_path.nil?
File.basename file_path
end
|
#path ⇒ Object
25
26
27
28
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 25
def path
return nil if file_path.nil?
File.dirname file_path
end
|