fixy 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/lib/fixy/record.rb +2 -2
- data/lib/fixy/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f33b913ca5e515fc32e84463bbb0bca7b04d4fb0349ae673f3906fe8530355c5
|
4
|
+
data.tar.gz: 693fbf4d139be73d471c6665fbeed04e26ea5b3f55007672fa6ddeb38d17fec9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8cd433833fa4598b166f4ba4bdfab5879579288b4f977810f50e97ad2391dae9318cf036593d44af8cf871f3a5228ad4c45e75abb6437559cc3a429731045bb
|
7
|
+
data.tar.gz: 4b4802efeeb1b0aee6c988428fd15f17e7d9692733199fb6c67fe9053c9a4da488ec6fa3a58f88b5927c7abc8b25ce3853ff19df4cdac8f1c9df2022d43a7342
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -153,10 +153,10 @@ Occasionally, it is useful to generate a document using existing records. This i
|
|
153
153
|
```ruby
|
154
154
|
class ParsedPeopleDocument < Fixy::Document
|
155
155
|
def build
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
156
|
+
parse_record IdentityRecord, 'Arcturus Mengsk '
|
157
|
+
parse_record IdentityRecord, 'Sarah Kerrigan '
|
158
|
+
parse_record IdentityRecord, 'Jim Raynor '
|
159
|
+
end
|
160
160
|
end
|
161
161
|
```
|
162
162
|
|
data/lib/fixy/record.rb
CHANGED
@@ -14,7 +14,7 @@ module Fixy
|
|
14
14
|
@line_ending = character
|
15
15
|
end
|
16
16
|
|
17
|
-
def field(name, size, range, type)
|
17
|
+
def field(name, size, range, type, &block)
|
18
18
|
@record_fields ||= default_record_fields
|
19
19
|
range_matches = range.match /^(\d+)(?:-(\d+))?$/
|
20
20
|
|
@@ -42,7 +42,7 @@ module Fixy
|
|
42
42
|
# We're good to go :)
|
43
43
|
@record_fields[range_from] = { name: name, from: range_from, to: range_to, size: size, type: type}
|
44
44
|
|
45
|
-
field_value(name,
|
45
|
+
field_value(name, block) if block_given?
|
46
46
|
end
|
47
47
|
|
48
48
|
# Convenience method for creating field methods
|
data/lib/fixy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Skalli
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,7 +84,7 @@ homepage: https://github.com/chetane/fixy
|
|
84
84
|
licenses:
|
85
85
|
- MIT
|
86
86
|
metadata: {}
|
87
|
-
post_install_message:
|
87
|
+
post_install_message:
|
88
88
|
rdoc_options: []
|
89
89
|
require_paths:
|
90
90
|
- lib
|
@@ -99,9 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
|
103
|
-
|
104
|
-
signing_key:
|
102
|
+
rubygems_version: 3.0.6
|
103
|
+
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: Provides a DSL for defining, generating, and debugging fixed width documents.
|
107
106
|
test_files:
|