Class: Frontier::Channel
- Inherits:
-
Object
- Object
- Frontier::Channel
- Defined in:
- lib/frontier/channel.rb
Instance Method Summary collapse
-
#initialize(host, port) ⇒ Channel
constructor
A new instance of Channel.
- #inspect ⇒ Object
- #submit(request) ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Channel
Returns a new instance of Channel.
6 7 8 9 |
# File 'lib/frontier/channel.rb', line 6 def initialize(host, port) @remote = "#{host}:#{port}" @channel = IO.popen("ssh -p #{port} #{host} frontier", "r+") end |
Instance Method Details
#inspect ⇒ Object
16 17 18 |
# File 'lib/frontier/channel.rb', line 16 def inspect "#<Frontier::Channel #{@remote}>" end |
#submit(request) ⇒ Object
11 12 13 14 |
# File 'lib/frontier/channel.rb', line 11 def submit(request) Marshal.dump(request, @channel) return hydrate(Marshal.load(@channel)) end |