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
34
35
36
37
38
39
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 34
def kernel_module_in_use
lspci_line = `lspci -nnk | grep -i vga -A3 | grep 'in use'`
/in use:\s*(\S+)/ =~ lspci_line && $1
rescue
''
end
|
.ldconfig ⇒ Object
51
52
53
54
55
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 51
def ldconfig
`ldconfig -p | grep 'libGL\\.so'`.lines
rescue
[]
end
|
.libgl_paths ⇒ Object
41
42
43
44
45
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 41
def libgl_paths
Dir.glob('/usr/lib*/**/libGL.so*')
rescue
[]
end
|
.sixtyfour_bits? ⇒ Boolean
47
48
49
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 47
def sixtyfour_bits?
1.size == 8
end
|
Instance Method Details
#file ⇒ Object
28
29
30
31
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 28
def file
return nil if file_path.nil?
File.basename file_path
end
|
#path ⇒ Object
23
24
25
26
|
# File 'lib/mittsu/renderers/generic_lib.rb', line 23
def path
return nil if file_path.nil?
File.dirname file_path
end
|