Method: UPnP::Device.new

Defined in:
lib/UPnP/device.rb

.new(type, *args) ⇒ Object

Creates an instance of the UPnP::Device subclass named type if it is in the UPnP::Device namespace.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/UPnP/device.rb', line 252

def self.new(type, *args)
  if UPnP::Device == self then
    klass = begin
              const_get type
            rescue NameError
              self
            end

    klass.new(type, *args)
  else
    super
  end
end