deadly_serious 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deadly_serious/engine/json_io.rb +2 -10
- data/lib/deadly_serious/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f3a2d33ba234a177f7128b43ed9df626fd2663
|
4
|
+
data.tar.gz: c22d5dd6fe2bebf4cad117bbfc8f303666cb94ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcf931998a2c1940b053a6b8af8d9d6099c5ad7f7bd9c4da2d12ff2ca2abb67d1624b2f8e51932a6ff027ab9969893af964631e4a5a8a0929ab161e0698d67e5
|
7
|
+
data.tar.gz: 45e91a80e6487c7c40e1b631003b910f469f8685d86b70a2086a48b57fdc4c9d208459d5db912e115fbf8ee8bb4632db6dc002dd5ff20c59410fc2b31f78a74a
|
@@ -3,6 +3,8 @@ require 'json'
|
|
3
3
|
module DeadlySerious
|
4
4
|
module Engine
|
5
5
|
class JsonIo
|
6
|
+
include Enumerable
|
7
|
+
|
6
8
|
def initialize(io)
|
7
9
|
@io = io
|
8
10
|
end
|
@@ -11,16 +13,6 @@ module DeadlySerious
|
|
11
13
|
@io.each { |line| yield JSON.parse(line) }
|
12
14
|
end
|
13
15
|
|
14
|
-
def each_cons(qty)
|
15
|
-
@io.each_cons(qty) do |args|
|
16
|
-
yield *(args.map { |line| JSON.parse(line) })
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def each_with_object(object)
|
21
|
-
@io.each_with_object(object) { |line, object| yield JSON.parse(line), object }
|
22
|
-
end
|
23
|
-
|
24
16
|
def <<(value)
|
25
17
|
@io << value.to_json << "\n"
|
26
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deadly_serious
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronie Uliana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|