Module: Phidgets::FFI::CPhidgetMotorControl

Defined in:
lib/phidgets-ffi/ffi/motor_control.rb

Class Method Summary collapse

Class Method Details

.method_missing(method, *args, &block) ⇒ Object



55
56
57
58
59
60
61
62
63
# File 'lib/phidgets-ffi/ffi/motor_control.rb', line 55

def self.method_missing(method, *args, &block)
  if ::Phidgets::FFI.respond_to?("CPhidgetMotorControl_#{method}".to_sym)
    if (rs = ::Phidgets::FFI.send("CPhidgetMotorControl_#{method}".to_sym, *args, &block)) != 0
      raise Phidgets::Error.exception_for(rs), Phidgets::FFI.error_description(rs)
    end
  else
    super(method, *args, &block)
  end
end