How do I access the value of variable a in test1.rb to use further in test1.rb outside SSH?
In test1.rb
Net::SSH.start("host", ava) do |ssh|
ssh.exec('ruby test2.rb')
end
In host, test2.rb
#!/usr/bin/env ruby
class Value
def get_value()
a = 1 + 2
end
end
v = Value.new
v.get_value()
puts v.get_value().exit v.get_value()