From 3962c38af330fd658fb5c4ea535963a11dc257a4 Mon Sep 17 00:00:00 2001 From: gemmaro Date: Sat, 3 Sep 2022 10:19:49 +0900 Subject: [PATCH] derive Enumerable --- lib/ndjson.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ndjson.rb b/lib/ndjson.rb index 6048885..c98260f 100644 --- a/lib/ndjson.rb +++ b/lib/ndjson.rb @@ -12,6 +12,8 @@ def initialize input end end + include Enumerable + def each &block @input.each do |line| json_line = JSON.parse(line)