Class: RubDev::Enumerate
- Inherits:
-
Object
- Object
- RubDev::Enumerate
- Defined in:
- lib/rubdev/enumerate.rb
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(context) ⇒ Enumerate
constructor
A new instance of Enumerate.
- #match_initialized ⇒ Object
- #match_parent(parent) ⇒ Object
- #match_property(property, value) ⇒ Object
- #match_subsystem(subsystem) ⇒ Object
- #match_sysattr(sysattr, value) ⇒ Object
- #match_sysname(sysname) ⇒ Object
- #match_tag(tag) ⇒ Object
- #nomatch_subsystem(subsystem) ⇒ Object
- #nomatch_sysattr(sysattr, value) ⇒ Object
- #ref ⇒ Object
- #scan_devices ⇒ Object
- #scan_subsystems ⇒ Object
- #syspath=(syspath) ⇒ Object
- #to_list ⇒ Object
- #unref ⇒ Object
Constructor Details
Instance Method Details
#context ⇒ Object
36 37 38 39 40 |
# File 'lib/rubdev/enumerate.rb', line 36 def context Context.allocate.tap {|i| i.instance_variable_set(:@pointer, RubDev::C.udev_enumerate_get_udev(@pointer)) } end |
#match_initialized ⇒ Object
79 80 81 |
# File 'lib/rubdev/enumerate.rb', line 79 def match_initialized !RubDev::C.udev_enumerate_add_match_is_initialized(@pointer).zero? end |
#match_parent(parent) ⇒ Object
73 74 75 |
# File 'lib/rubdev/enumerate.rb', line 73 def match_parent (parent) !RubDev::C.udev_enumerate_add_match_parent(@pointer, parent).zero? end |
#match_property(property, value) ⇒ Object
64 65 66 |
# File 'lib/rubdev/enumerate.rb', line 64 def match_property (property, value) !RubDev::C.udev_enumerate_add_match_property(@pointer, property, value).zero? end |
#match_subsystem(subsystem) ⇒ Object
48 49 50 |
# File 'lib/rubdev/enumerate.rb', line 48 def match_subsystem (subsystem) !RubDev::C.udev_enumerate_add_match_subsystem(@pointer, subsystem).zero? end |
#match_sysattr(sysattr, value) ⇒ Object
56 57 58 |
# File 'lib/rubdev/enumerate.rb', line 56 def match_sysattr (sysattr, value) !RubDev::C.udev_enumerate_add_match_sysattr(@pointer, sysattr, value).zero? end |
#match_sysname(sysname) ⇒ Object
84 85 86 |
# File 'lib/rubdev/enumerate.rb', line 84 def match_sysname (sysname) !RubDev::C.udev_enumerate_add_match_sysname(@pointer, sysname).zero? end |
#match_tag(tag) ⇒ Object
68 69 70 |
# File 'lib/rubdev/enumerate.rb', line 68 def match_tag (tag) !RubDev::C.udev_enumerate_add_match_tag(@pointer, tag).zero? end |
#nomatch_subsystem(subsystem) ⇒ Object
52 53 54 |
# File 'lib/rubdev/enumerate.rb', line 52 def nomatch_subsystem (subsystem) !RubDev::C.udev_enumerate_add_nomatch_subsystem(@pointer, subsystem).zero? end |
#nomatch_sysattr(sysattr, value) ⇒ Object
60 61 62 |
# File 'lib/rubdev/enumerate.rb', line 60 def nomatch_sysattr (sysattr, value) !RubDev::C.udev_enumerate_add_nomatch_sysattr(@pointer, sysattr, value).zero? end |
#ref ⇒ Object
26 27 28 29 |
# File 'lib/rubdev/enumerate.rb', line 26 def ref RubDev::C.udev_enumerate_ref(@pointer) self end |
#scan_devices ⇒ Object
92 93 94 |
# File 'lib/rubdev/enumerate.rb', line 92 def scan_devices !RubDev::C.udev_enumerate_scan_devices(@pointer).zero? end |
#scan_subsystems ⇒ Object
96 97 98 |
# File 'lib/rubdev/enumerate.rb', line 96 def scan_subsystems !RubDev::C.udev_enumerate_scan_subsystems(@pointer).zero? end |
#syspath=(syspath) ⇒ Object
88 89 90 |
# File 'lib/rubdev/enumerate.rb', line 88 def syspath= (syspath) !RubDev::C.udev_enumerate_add_syspath(syspath).zero? end |