Class: ProconBypassMan::DeviceModel
- Inherits:
-
Object
- Object
- ProconBypassMan::DeviceModel
- Defined in:
- lib/procon_bypass_man/device_model.rb
Instance Method Summary collapse
-
#initialize(device) ⇒ DeviceModel
constructor
A new instance of DeviceModel.
- #non_blocking_read ⇒ String
- #send(raw_data) ⇒ Object
Constructor Details
#initialize(device) ⇒ DeviceModel
Returns a new instance of DeviceModel.
3 4 5 |
# File 'lib/procon_bypass_man/device_model.rb', line 3 def initialize(device) @device = device end |
Instance Method Details
#non_blocking_read ⇒ String
14 15 16 |
# File 'lib/procon_bypass_man/device_model.rb', line 14 def non_blocking_read @device.read_nonblock(64) end |
#send(raw_data) ⇒ Object
8 9 10 |
# File 'lib/procon_bypass_man/device_model.rb', line 8 def send(raw_data) @device.write_nonblock(raw_data) end |