Class: USB::Endpoint

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Comparable
Defined in:
lib/libusb/compat.rb

Instance Method Summary collapse

Constructor Details

#initialize(ep) ⇒ Endpoint

Returns a new instance of Endpoint.



271
272
273
# File 'lib/libusb/compat.rb', line 271

def initialize(ep)
  @ep = ep
end

Instance Method Details

#<=>(o) ⇒ Object



279
280
281
# File 'lib/libusb/compat.rb', line 279

def <=>(o)
  @ep<=>o.instance_variable_get(:@ep)
end

#busObject



283
# File 'lib/libusb/compat.rb', line 283

def bus() self.setting.interface.configuration.device.bus end

#configurationObject



285
# File 'lib/libusb/compat.rb', line 285

def configuration() self.setting.interface.configuration end

#deviceObject



284
# File 'lib/libusb/compat.rb', line 284

def device() self.setting.interface.configuration.device end

#interfaceObject



286
# File 'lib/libusb/compat.rb', line 286

def interface() self.setting.interface end

#settingObject



287
# File 'lib/libusb/compat.rb', line 287

def setting; Setting.new(@ep.setting); end