class DBus::ObjectPath
A {::String} that validates at initialization time. See also {DBus::Data::ObjectPath} @see dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
Public Class Methods
Source
# File lib/dbus/object_path.rb, line 17 def initialize(str) unless self.class.valid?(str) raise DBus::Error, "Invalid object path #{str.inspect}" end super end
@raise Error
if not a valid object path
Calls superclass method
Source
# File lib/dbus/object_path.rb, line 25 def self.valid?(str) str == "/" || str =~ %r{\A(/[A-Za-z0-9_]+)+\z} end