# File 'lib/pi_piper/spi.rb', line 172defwrite(*args)caseargs.countwhen0raiseArgumentError.new("missing arguments")when1data=args.firstelsedata=argsendenabledocasedatawhenNumericPlatform.driver.spi_transfer(data)whenEnumerablePlatform.driver.spi_transfer_bytes(data)elseraiseArgumentError.new("#{data.class} is not valid data. Use Numeric or an Enumerable of numbers")endendend