我正在编写一个Ruby,它将通过USB通过串行方式与设备通信。我需要处理几种不同的通信格式,格式是使用PID/VID值的组合来确定的。
我希望gem是跨平台的( Linux / Mac /Windows),但我只满足于Linux和Mac。
在Ruby中,使用最少数量的宝石来可靠地检测串行端口的USB /VID信息的最可移植方式是什么?
我有一堆像这样格式化的数据,它们在前置标签中显示得很好:
1: Here's my first row, and it is
quite long...
and can span over several rows.
2: This is the second row.
但是,我想对它进行一些控制,也许可以将其转换为html:
<ol>
<li>Here's my first row, and it is<br/>quite long...<br/>and can span over several rows.