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

new(str) click to toggle source

@raise Error if not a valid object path

Calls superclass method
   # File lib/dbus/object_path.rb
17 def initialize(str)
18   unless self.class.valid?(str)
19     raise DBus::Error, "Invalid object path #{str.inspect}"
20   end
21 
22   super
23 end
valid?(str) click to toggle source
   # File lib/dbus/object_path.rb
25 def self.valid?(str)
26   str == "/" || str =~ %r{\A(/[A-Za-z0-9_]+)+\z}
27 end