REX12 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/lib/REX12/version.rb +3 -0
- data/lib/rex12/parse_error.rb +1 -0
- data/rex12.gemspec +1 -1
- metadata +3 -3
- data/lib/rex12/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81999a8ca44b2857706d80a1fc81b5ccd4706cc3
|
4
|
+
data.tar.gz: 74076d6beac2a9a25ad779fb6e04245c8878d1bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e04d2f6dbaca9143825ec3b05582769eb85314e3623b660838e092604b94ccab421521b12eb0bdc71933a40446af41281d33c8b5b6eb87c43ea8562b457365
|
7
|
+
data.tar.gz: b690143ef5c8e3c21c53f75529772ba9cc1d19cc13b7d6e5a59d9a10d1e2d7516356c592a466a3b047932bdc561fafc89579f37d47752ad32caa25453795773f
|
data/README.md
CHANGED
@@ -23,7 +23,19 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
|
26
|
+
Array form:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'rex12'
|
30
|
+
|
31
|
+
sgements = REX12::Document.read('myfilepath.edi')
|
32
|
+
some_date = segments.find {|seg| seg.segment_type=='DTM' && seg.elements[1].value=='056'}
|
33
|
+
if some_date
|
34
|
+
puts some_date.elements[2].value
|
35
|
+
else
|
36
|
+
puts "This is not the date you're looking for"
|
37
|
+
end
|
38
|
+
```
|
27
39
|
|
28
40
|
## Development
|
29
41
|
|
data/lib/rex12/parse_error.rb
CHANGED
data/rex12.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: REX12
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Glick
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,12 +83,12 @@ files:
|
|
83
83
|
- Rakefile
|
84
84
|
- bin/console
|
85
85
|
- bin/setup
|
86
|
+
- lib/REX12/version.rb
|
86
87
|
- lib/rex12.rb
|
87
88
|
- lib/rex12/document.rb
|
88
89
|
- lib/rex12/element.rb
|
89
90
|
- lib/rex12/parse_error.rb
|
90
91
|
- lib/rex12/segment.rb
|
91
|
-
- lib/rex12/version.rb
|
92
92
|
- rex12.gemspec
|
93
93
|
homepage: https://github.com/Vandegrift/rex12
|
94
94
|
licenses:
|
data/lib/rex12/version.rb
DELETED