Class: RubDev::Context
- Inherits:
-
Object
- Object
- RubDev::Context
- Defined in:
- lib/rubdev/context.rb
Instance Method Summary collapse
- #dev_path ⇒ Object
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #log_fn=(fn) ⇒ Object
- #log_priority ⇒ Object
- #log_priority=(p) ⇒ Object
- #ref ⇒ Object
- #run_path ⇒ Object
- #sys_path ⇒ Object
- #to_c ⇒ Object
- #unref ⇒ Object
- #userdata ⇒ Object
- #userdata=(data) ⇒ Object
Constructor Details
Instance Method Details
#dev_path ⇒ Object
56 57 58 |
# File 'lib/rubdev/context.rb', line 56 def dev_path RubDev::C.udev_get_dev_path(@pointer) end |
#log_fn=(fn) ⇒ Object
38 39 40 41 |
# File 'lib/rubdev/context.rb', line 38 def log_fn= (fn) return false unless fn.is_a?(Proc) RubDev::C.udev_set_log_fn(@pointer, fn) end |
#log_priority ⇒ Object
43 44 45 |
# File 'lib/rubdev/context.rb', line 43 def log_priority RubDev::C.udev_get_log_priority(@pointer) end |
#log_priority=(p) ⇒ Object
47 48 49 50 |
# File 'lib/rubdev/context.rb', line 47 def log_priority= (p) return false unless p.is_a?(Integer) RubDev::C.udev_set_log_priority(@pointer, p) end |
#ref ⇒ Object
28 29 30 31 |
# File 'lib/rubdev/context.rb', line 28 def ref RubDev::C.udev_ref(@pointer) self end |
#run_path ⇒ Object
61 62 63 |
# File 'lib/rubdev/context.rb', line 61 def run_path RubDev::C.udev_get_run_path(@pointer) end |
#sys_path ⇒ Object
52 53 54 |
# File 'lib/rubdev/context.rb', line 52 def sys_path RubDev::C.udev_get_sys_path(@pointer) end |
#to_c ⇒ Object
74 75 76 |
# File 'lib/rubdev/context.rb', line 74 def to_c @pointer end |
#unref ⇒ Object
33 34 35 36 |
# File 'lib/rubdev/context.rb', line 33 def unref RubDev::C.udev_unref(@pointer) self end |