Method: VimColor#run_stream

Defined in:
lib/msgpack/idl/command/vimcolor.rb

#run_stream(stream, options, formatter_class, *formatter_args) ⇒ Object



111
112
113
114
115
116
117
118
119
120
# File 'lib/msgpack/idl/command/vimcolor.rb', line 111

def run_stream(stream, options, formatter_class, *formatter_args)
  tmp_in = Tempfile.new('ruby-vimcolor-input')
  begin
    tmp_in.write(stream.read)
    tmp_in.flush
    run_file(tmp_in.path, options, formatter_class, *formatter_args)
  ensure
    tmp_in.close
  end
end