lib/dbus/export.rb in ruby-dbus-openplacos-0.7.2 vs lib/dbus/export.rb in ruby-dbus-openplacos-0.7.2.1
- old
+ new
@@ -47,14 +47,24 @@
def self.intfs= param
@@intfs_hash[self] = param
end
def intfs
- self.class.intfs
+ #check if singleton class is defined
+ if self.singleton_methods.empty?
+ self.class.intfs
+ else
+ self.singleton_class.intfs
+ end
end
def intfs= param
- self.class.intfs = param
+ #check if singleton class is defined
+ if self.singleton_methods.empty?
+ self.class.intfs = param
+ else
+ self.singleton_class.intfs = param
+ end
end
# State that the object implements the given _intf_.
def implements(intf)
# use a setter