Hash
Class representing a node on an object path.
Return inspect information of the node.
# File lib/dbus/bus.rb, line 165 def inspect # Need something here "<DBus::Node #{sub_inspect}>" end
Return instance inspect information, used by Node#inspect.
# File lib/dbus/bus.rb, line 171 def sub_inspect s = "" if not @object.nil? s += "%x " % @object.object_id end s + "{" + keys.collect { |k| "#{k} => #{self[k].sub_inspect}" }.join(",") + "}" end
Return an XML string representation of the node. It is shallow, not recursing into subnodes
# File lib/dbus/bus.rb, line 144 def to_xml xml = '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> ' self.each_pair do |k, v| xml += "<node name=\"#{k}\" />" end if @object @object.intfs.each_pair do |k, v| xml += %{<interface name="#{v.name}">\n} v.methods.each_value { |m| xml += m.to_xml } v.signals.each_value { |m| xml += m.to_xml } xml +="</interface>\n" end end xml += '</node>' xml end
Generated with the Darkfish Rdoc Generator 2.