Class: Gherkin::Stream::ProtobufMessageStream

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/stream/protobuf_message_stream.rb

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ ProtobufMessageStream

Returns a new instance of ProtobufMessageStream.



6
7
8
# File 'lib/gherkin/stream/protobuf_message_stream.rb', line 6

def initialize(io)
  @io = io
end

Instance Method Details

#messagesObject



10
11
12
13
14
15
16
17
18
# File 'lib/gherkin/stream/protobuf_message_stream.rb', line 10

def messages
  Enumerator.new do |y|
    until @io.eof?
      STDERR.puts "HELLO"
      envelope = Cucumber::Messages::Envelope.parse_delimited_from(@io)
      y.yield envelope
    end
  end
end