class DBus::EmitsChangedSignal

Describes the behavior of PropertiesChanged signal, for a single property or for an entire interface.

The possible values are:

The default is:

@see DBus::Object.emits_changed_signal @see DBus::Object.dbus_attr_accessor @see dbus.freedesktop.org/doc/dbus-specification.html#introspection-format

Immutable once constructed.

Constants

DEFAULT_ECS

Attributes

value[R]

@return [true,false,:const,:invalidates]

Public Class Methods

new(value, interface: nil) click to toggle source

@param value [true,false,:const,:invalidates,nil]

See class-level description above, {EmitsChangedSignal}.

@param interface [Interface,nil]

If the (property-level) *value* is unspecified (nil), this is the
containing {Interface} to get the value from.
   # File lib/dbus/emits_changed_signal.rb
43 def initialize(value, interface: nil)
44   if value.nil?
45     raise ArgumentError, "Both arguments are nil" if interface.nil?
46 
47     @value = interface.emits_changed_signal.value
48   else
49     expecting = [true, false, :const, :invalidates]
50     unless expecting.include?(value)
51       raise ArgumentError, "Expecting one of #{expecting.inspect}. Seen #{value.inspect}"
52     end
53 
54     @value = value
55   end
56 
57   freeze
58 end

Public Instance Methods

==(other) click to toggle source
   # File lib/dbus/emits_changed_signal.rb
72 def ==(other)
73   if other.is_a?(self.class)
74     other.value == @value
75   else
76     other == value
77   end
78 end
Also aliased as: eql?
eql?(other)
Alias for: ==
to_s() click to toggle source
   # File lib/dbus/emits_changed_signal.rb
68 def to_s
69   @value.to_s
70 end
to_xml() click to toggle source

Return introspection XML string representation @return [String]

   # File lib/dbus/emits_changed_signal.rb
62 def to_xml
63   return "" if @value == true
64 
65   "    <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"#{@value}\"/>\n"
66 end