Class: Nitra::Slave::Server
- Inherits:
-
Object
- Object
- Nitra::Slave::Server
- Defined in:
- lib/nitra/slave.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
65 66 67 |
# File 'lib/nitra/slave.rb', line 65 def channel @channel end |
Instance Method Details
#run ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/nitra/slave.rb', line 67 def run @channel = Nitra::Channel.new($stdin, $stdout) response = @channel.read unless response && response["command"] == "configuration" puts "handshake failed" exit 1 end @channel.write("command" => "connected") runner = Nitra::Runner.new(response["configuration"], channel, response["runner_id"]) runner.run end |