Class: DBus::Systemd::Timedated

Inherits:
Object
  • Object
show all
Includes:
Mixin::MethodMissing, Mixin::Properties
Defined in:
lib/dbus/systemd/timedated.rb

Constant Summary collapse

NODE =

the timedated dbus node path

'/org/freedesktop/timedate1'.freeze
SERVICE =

the timedated dbus service & interface

INTERFACE = 'org.freedesktop.timedate1'.freeze

Instance Attribute Summary collapse

Attributes included from Mixin::MethodMissing

#object

Instance Method Summary collapse

Methods included from Mixin::Properties

#properties

Methods included from Mixin::MethodMissing

#method_missing, #respond_to_missing?

Constructor Details

#initialize(bus = Helpers.system_bus) ⇒ Timedated

Create a new object for interfacing with timedated

Parameters:

  • bus (DBus::SystemBus, DBus::SessionBus) (defaults to: Helpers.system_bus)

    dbus instance



44
45
46
47
48
49
# File 'lib/dbus/systemd/timedated.rb', line 44

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

#serviceDBus::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.

Returns:

  • (DBus::Service)


38
39
40
# File 'lib/dbus/systemd/timedated.rb', line 38

def service
  @service
end