Module: DBusInterface
- Defined in:
- lib/dbus_interface.rb
Defined Under Namespace
Modules: Class, Object
Classes: Configuration, Connection, UnavailableError
Class Method Summary
collapse
Class Method Details
27
28
29
|
# File 'lib/dbus_interface.rb', line 27
def self.config
@@config ||= Configuration.new
end
|
23
24
25
|
# File 'lib/dbus_interface.rb', line 23
def self.configure(&block)
yield config
end
|
19
20
21
|
# File 'lib/dbus_interface.rb', line 19
def self.service
@@service ||= system_bus.service config.interface
end
|
.system_bus ⇒ Object
13
14
15
16
17
|
# File 'lib/dbus_interface.rb', line 13
def self.system_bus
::DBus::SystemBus.instance
rescue Errno::ENOENT => e
raise UnavailableError.new "DBus SystemBus not available! (#{e})"
end
|