x12-lite 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/x12-lite.rb +23 -23
- metadata +2 -3
- data/x12-lite-0.3.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0dda270782d3da6aa8372f5e723020f80307bb7b79863adad4395f37181d6ea
|
4
|
+
data.tar.gz: 07f4bd9ff342f3e1a10744eed0ddc1e457002f2d7b997acbe6e13aaa852cb153
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bb1cfab0e81e8ac3ac4ef44908502480287f4d93fab64d3447d01770fdade114d706c99df7a8085f35f46dac9bf1cd2c7e44bb5236c594d867f69b922221903
|
7
|
+
data.tar.gz: ac5eca285b4671120d79dbeed83502ef8959501344d8a1575ea97954194256c72593b99e1ad21e17dc6df104808bfe60fd3305009530cb579800d927240562c3
|
data/lib/x12-lite.rb
CHANGED
@@ -45,7 +45,7 @@ end
|
|
45
45
|
# ==[ X12 ]=====================================================================
|
46
46
|
|
47
47
|
class X12
|
48
|
-
VERSION="0.3.
|
48
|
+
VERSION="0.3.3"
|
49
49
|
|
50
50
|
include Enumerable
|
51
51
|
|
@@ -183,7 +183,7 @@ class X12
|
|
183
183
|
end
|
184
184
|
end
|
185
185
|
tag = "#{seg}%s-#{j}" % [num > 1 && !only ? "(#{num})" : ""]
|
186
|
-
out << (tag.ljust(left) +
|
186
|
+
out << (tag.ljust(left) + ansi(fld, "fff", "369"))
|
187
187
|
end
|
188
188
|
end
|
189
189
|
end
|
@@ -368,27 +368,27 @@ class X12
|
|
368
368
|
self
|
369
369
|
end
|
370
370
|
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
#
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
371
|
+
def each(seg=nil)
|
372
|
+
to_a.each do |row|
|
373
|
+
next if seg && !(seg === row.first)
|
374
|
+
yield row
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
# means this each may change @ary, so clear @str in case
|
379
|
+
def each!(...)
|
380
|
+
out = each(...)
|
381
|
+
@str &&= nil
|
382
|
+
out
|
383
|
+
end
|
384
|
+
|
385
|
+
def grep(seg)
|
386
|
+
reduce([]) do |ary, row|
|
387
|
+
ary.push(block_given? ? yield(row) : row) if seg === row.first
|
388
|
+
ary
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
392
|
# def now(fmt="%Y%m%d%H%M%S")
|
393
393
|
# Time.now.strftime(fmt)
|
394
394
|
# end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: x12-lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby gem to parse and generate X.12 transactions
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -22,7 +22,6 @@ files:
|
|
22
22
|
- README.md
|
23
23
|
- bin/x12
|
24
24
|
- lib/x12-lite.rb
|
25
|
-
- x12-lite-0.3.0.gem
|
26
25
|
- x12-lite.gemspec
|
27
26
|
homepage: https://github.com/shreeve/x12-lite
|
28
27
|
licenses:
|
data/x12-lite-0.3.0.gem
DELETED
Binary file
|