Class: Bundesstrasse::Device
- Inherits:
-
Object
- Object
- Bundesstrasse::Device
- Includes:
- Errors
- Defined in:
- lib/bundesstrasse/device.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#backend ⇒ Object
readonly
Returns the value of attribute backend.
-
#frontend ⇒ Object
readonly
Returns the value of attribute frontend.
Instance Method Summary collapse
-
#initialize(type, frontend, backend) ⇒ Device
constructor
A new instance of Device.
- #start ⇒ Object
Methods included from Errors
Constructor Details
#initialize(type, frontend, backend) ⇒ Device
Returns a new instance of Device.
7 8 9 10 11 |
# File 'lib/bundesstrasse/device.rb', line 7 def initialize(type, frontend, backend) @type = type @frontend = frontend @backend = backend end |
Instance Attribute Details
#backend ⇒ Object (readonly)
Returns the value of attribute backend.
6 7 8 |
# File 'lib/bundesstrasse/device.rb', line 6 def backend @backend end |
#frontend ⇒ Object (readonly)
Returns the value of attribute frontend.
6 7 8 |
# File 'lib/bundesstrasse/device.rb', line 6 def frontend @frontend end |
Instance Method Details
#start ⇒ Object
13 14 15 16 17 |
# File 'lib/bundesstrasse/device.rb', line 13 def start error_check do ZMQ::LibZMQ.zmq_device(@type, @frontend.pointer, @backend.pointer) end end |