tabreader 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f60d622c5ed07603e3ce719cbf1bca92093a1ca
4
- data.tar.gz: a751de430625b35d0bd6b9343d2f9b6cd3571f40
3
+ metadata.gz: '093433817ddd93e79af07604a115964639269b2a'
4
+ data.tar.gz: 85d0c1333b75670230133e73f91cda27c1bb68ba
5
5
  SHA512:
6
- metadata.gz: bb921628bb052ae9e5f9ac3ff02db1fe3e578491fab8d222a4b2a6f99a761ba3dbcac0b262a8e91af4a071b99351935b28d670fe6f787614160a314724b872f7
7
- data.tar.gz: ab8a161b0d8b72e1eaa7ab226fd31dcd1e719a030de7e7e93fd3547a29dd09c1bca3acb19881f20e282387a41cbe29a76dd29431dd1c90f79c686e068ebe3f57
6
+ metadata.gz: 0c254861cd86e97d23b7f020d9a1323314b036964f3b14551da66f8e6f4c2948ea6c6874b3121c82f34070c13606f4631721d532408899a0393064311dcc71ff
7
+ data.tar.gz: 9baa9df8979c3eb1923c31ae4344e57926f4c1e431c3d6c4b7567e92cf5bbf9348e55b08756e04cc2a98cfd5978f0c12792d17fb6d713525ab80d008ae2511d5
data/README.md CHANGED
@@ -52,8 +52,8 @@ pp records
52
52
  TabReader.foreach( "values.tab" ) do |rec|
53
53
  pp rec
54
54
  end
55
- ## => ["1","2","3"]
56
- ## => ["5","6","7"]
55
+ # => ["1","2","3"]
56
+ # => ["5","6","7"]
57
57
  ```
58
58
 
59
59
 
@@ -171,7 +171,7 @@ Here is a quick grammar in Backus-Naur Form (BNF):
171
171
  ```
172
172
  field ::= [character]+ # multiple characters
173
173
  record ::= field [TAB field]+ EOL # at least one field, or more
174
- tab ::= record+
174
+ datafile ::= record+
175
175
  ```
176
176
 
177
177
  Example:
@@ -112,3 +112,26 @@ def self.header( path )
112
112
  end
113
113
 
114
114
  end # class TabReader
115
+
116
+
117
+
118
+
119
+ class TabHashReader
120
+
121
+ def self.read( path, headers: true )
122
+ TabReader.read( path, headers: headers )
123
+ end
124
+
125
+ def self.parse( txt, headers: true )
126
+ TabReader.parse( txt, headers: headers )
127
+ end
128
+
129
+ def self.foreach( path, headers: true, &block )
130
+ TabReader.foreach( path, headers: headers, &block )
131
+ end
132
+
133
+ def self.header( path ) ## add header too? why? why not?
134
+ TabReader.header( path )
135
+ end
136
+
137
+ end # class TabHashReader
@@ -5,8 +5,8 @@
5
5
  class TabReader
6
6
 
7
7
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
8
- MINOR = 0
9
- PATCH = 1
8
+ MINOR = 1
9
+ PATCH = 0
10
10
  VERSION = [MAJOR,MINOR,PATCH].join('.')
11
11
 
12
12
  def self.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer