Class: Frontier::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/frontier/channel.rb

Instance Method Summary collapse

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

#inspectObject



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