Module: CommonProxy

Included in:
PosixProxy, VimProxy
Defined in:
lib/shell-proxy/common.rb

Instance Method Summary collapse

Instance Method Details

#__emit(str) ⇒ Object

XXX Holy shit wat



13
14
15
# File 'lib/shell-proxy/common.rb', line 13

def __emit(str)
  __writer.flush
end

#__eval(str) ⇒ Object



8
9
10
# File 'lib/shell-proxy/common.rb', line 8

def __eval(str)
  @cmd_buffer << str
end

#__main__(writer = nil, buffer = nil, &block) ⇒ Object



2
3
4
5
6
# File 'lib/shell-proxy/common.rb', line 2

def __main__(writer = nil, buffer = nil, &block)
  @cmd_buffer = buffer || CmdBuffer.new
  instance_exec(&block)
  @cmd_buffer.write(writer || __writer)
end

#__writerObject



17
18
19
# File 'lib/shell-proxy/common.rb', line 17

def __writer
  @writer ||= ShellWriter.new($stdout)
end