Class: DBus::BusName
- Inherits:
-
String
- Object
- String
- DBus::BusName
- Defined in:
- lib/dbus/bus_name.rb
Overview
D-Bus: a name for a connection, like “:1.3” or “org.example.ManagerManager”. Implemented as a String that validates at initialization time.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ BusName
constructor
A new instance of BusName.
Constructor Details
Class Method Details
.valid?(name) ⇒ Boolean
25 26 27 28 29 |
# File 'lib/dbus/bus_name.rb', line 25 def self.valid?(name) name.size <= 255 && (name =~ /\A:[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)+\z/ || name =~ /\A[A-Za-z_-][A-Za-z0-9_-]*(\.[A-Za-z_-][A-Za-z0-9_-]*)+\z/) end |