censive 0.21 → 0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/censive.gemspec +1 -1
  3. data/lib/censive.rb +7 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dffdaf597e038881e378eb30acb7c44cde08de1f9e40e2180076eaa11356c68
4
- data.tar.gz: f9d7f77ac597a5d5a86fc1adcad430802ab20bd306bf5856f1191f57ff22f872
3
+ metadata.gz: 5f9bbebb5cd4aba5b0d22ec2f87e129a47292fc999ada61284ea53e5458c1d42
4
+ data.tar.gz: 9db7f322767ab0fe4275e2c40c0e466dd3654b1180aed55a4aa8826bddee3f78
5
5
  SHA512:
6
- metadata.gz: a0187489ebac8a9011f0f77dc9d52ca821ab080271f3eca6a1a40409b587534a9f4608d1f3b65a0253e587c242d01465e3cd773377f8d00b2fbd1723db4b5650
7
- data.tar.gz: 94f2e7a204d8b40e058f41d193add0002d169d5d244e81c6895e465de159c6a953f09e313689891f7d12c05bead3baa41ad6fd525a8e297143758553e39ef1ba
6
+ metadata.gz: a6b3eda844db32d8f50a9972eff3a2c1d690dc8bdcc0eb0276df6dea722d6a45790236e2b0dfaceb17555e153ce44f54c7b18df961babea70ac764ca03aeffa5
7
+ data.tar.gz: f3c153d47ddc3e2e27be33407d0ca9159776590d42b79e4cfa41c932b9cde3daa3dfdc68de238b3e34a243bc6aff4cfc34df7cc0a1b1aafc27cd0a77c185a8fa
data/censive.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "censive"
3
- s.version = "0.21"
3
+ s.version = "0.22"
4
4
  s.author = "Steve Shreeve"
5
5
  s.email = "steve.shreeve@gmail.com"
6
6
  s.summary =
data/lib/censive.rb CHANGED
@@ -28,7 +28,7 @@
28
28
  require "strscan"
29
29
 
30
30
  class Censive < StringScanner
31
- attr :encoding, :out
31
+ attr :encoding, :out, :rows
32
32
 
33
33
  def self.parse(...)
34
34
  new(...).parse
@@ -180,9 +180,9 @@ class Censive < StringScanner
180
180
  end
181
181
 
182
182
  def export(**opts)
183
- out = opts.empty? ? self : self.class.writer(**opts)
184
- each {|row| out << row }
185
- out.out
183
+ dest = opts.empty? ? self : self.class.writer(**opts)
184
+ each {|row| dest << row }
185
+ dest
186
186
  end
187
187
 
188
188
  # ==[ Helpers ]==
@@ -259,7 +259,9 @@ if __FILE__ == $0
259
259
  # csv.export(out: out) # (excel: true) # sep: "|")
260
260
  # puts out # .string
261
261
 
262
- puts Censive.new(str, excel: true, relax: true, out: "").export
262
+ csv = Censive.new(str, excel: true, relax: true, out: "")
263
+ out = csv.export
264
+ puts out.out
263
265
  end
264
266
 
265
267
  __END__
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: censive
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.21'
4
+ version: '0.22'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve