Class: DBus::Systemd::Hostnamed
- Inherits:
-
Object
- Object
- DBus::Systemd::Hostnamed
- Includes:
- Mixin::MethodMissing, Mixin::Properties
- Defined in:
- lib/dbus/systemd/hostnamed.rb
Constant Summary collapse
- NODE =
the hostnamed dbus node path
'/org/freedesktop/hostname1'.freeze
- SERVICE =
the hostnamed dbus service & interface
INTERFACE = 'org.freedesktop.hostname1'.freeze
Instance Attribute Summary collapse
- #service ⇒ DBus::Service readonly private
Attributes included from Mixin::MethodMissing
Instance Method Summary collapse
-
#initialize(bus = Helpers.system_bus) ⇒ Hostnamed
constructor
Creates a new Hostnamed object for interfacing with hostnamed on the given bus.
Methods included from Mixin::Properties
Methods included from Mixin::MethodMissing
#method_missing, #respond_to_missing?
Constructor Details
#initialize(bus = Helpers.system_bus) ⇒ Hostnamed
Creates a new Hostnamed object for interfacing with hostnamed on the given bus
49 50 51 52 53 54 |
# File 'lib/dbus/systemd/hostnamed.rb', line 49 def initialize(bus = Helpers.system_bus) @service = bus.service(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.
42 43 44 |
# File 'lib/dbus/systemd/hostnamed.rb', line 42 def service @service end |