Class: DBus::Systemd::Networkd::Manager
- Inherits:
-
Object
- Object
- DBus::Systemd::Networkd::Manager
- Includes:
- Mixin::MethodMissing, Mixin::Properties
- Defined in:
- lib/dbus/systemd/networkd/manager.rb
Constant Summary collapse
- NODE =
networkd manager object dbus node path
'/org/freedesktop/network1'.freeze
- INTERFACE =
networkd manager dbus interface
'org.freedesktop.network1.Manager'.freeze
Instance Attribute Summary collapse
- #service ⇒ DBus::Service readonly private
Attributes included from Mixin::MethodMissing
Instance Method Summary collapse
-
#initialize(bus = Systemd::Helpers.system_bus) ⇒ Manager
constructor
create a networkd manager dbus proxy object.
-
#link(id) ⇒ DBus::Systemd::Networkd::Link
get a link by id.
Methods included from Mixin::Properties
Methods included from Mixin::MethodMissing
#method_missing, #respond_to_missing?
Constructor Details
#initialize(bus = Systemd::Helpers.system_bus) ⇒ Manager
create a networkd manager dbus proxy object
49 50 51 52 53 54 |
# File 'lib/dbus/systemd/networkd/manager.rb', line 49 def initialize(bus = Systemd::Helpers.system_bus) @service = bus.service(Networkd::SERVICE) @object = @service.object(NODE) @object.default_iface = INTERFACE @object.introspect end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class DBus::Systemd::Mixin::MethodMissing
Instance Attribute Details
#service ⇒ DBus::Service (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/dbus/systemd/networkd/manager.rb', line 43 def service @service end |
Instance Method Details
#link(id) ⇒ DBus::Systemd::Networkd::Link
get a link by id
61 62 63 |
# File 'lib/dbus/systemd/networkd/manager.rb', line 61 def link(id) Link.new(id, self) end |