Module: DBus::Systemd::Mixin::MethodMissing

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &blk) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/dbus/systemd/mixin.rb', line 7

def method_missing(name, *args, &blk)
  if @object.respond_to?(name)
    @object.send(name, *args, &blk)
  else
    super
  end
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



5
6
7
# File 'lib/dbus/systemd/mixin.rb', line 5

def object
  @object
end

Instance Method Details

#respond_to_missing?(*args) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dbus/systemd/mixin.rb', line 15

def respond_to_missing?(*args)
  @object.respond_to?(*args) || super
end