class Cucumber::Messages::NdjsonToMessageEnumerator
Public Class Methods
new(io)
click to toggle source
Calls superclass method
# File lib/cucumber/messages/ndjson_to_message_enumerator.rb, line 6 def initialize(io) super() do |yielder| io.each_line do |line| next if line.strip.empty? begin m = Envelope.from_json(line) rescue => e raise "Not JSON: #{line.strip}" end yielder.yield(m) end end end