streamingly 0.2.3 → 0.2.4

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: 7c7837574ac0dd24e3390dcc4f6bf8c4e899a5f5
4
- data.tar.gz: c2fdf67db67fe7c33dfb74aee26ea2168a12afe4
3
+ metadata.gz: 457684ce6e8d5dcbfcdd75109553506abad640f0
4
+ data.tar.gz: c6164ac662cac7e76bde51fed2815b70dbeb3d70
5
5
  SHA512:
6
- metadata.gz: e2c0966fd1f04af67be2be2f3d2702eff5afcc9190b4936bdb99999b8bf88dcca901e04af0991bfa01e5ac8bb7d298e6f6a4ed4049f617930c4fe3c790862724
7
- data.tar.gz: 5412a8fca179e957e6e27546e3deba3187fd2daad70611f2c7a8cb92d5d0007157f264c0bd693aec1ecbc7043076ad98fd1820b0d83c0f7166e6c39074211ea0
6
+ metadata.gz: 349c229ca5a8e0d843675b472232331d23d98ddd4570fcbeb18c1d9e09ef35d188252ab550aca1f42ec5208b437f35dfa99b961f7f81dcad9d1e1200c746813d
7
+ data.tar.gz: 576499b30eca318bea397c193321003f1e896ff9127425e48e24a4d1488deafbc92e017165810973c05787a75330aaa7e92a9babe548c081d105419b018465a2
@@ -26,8 +26,12 @@ module Streamingly
26
26
 
27
27
  def self.from_csv(string)
28
28
  tokens = CSV.parse_line(string)
29
+ return unless tokens.size > 0
29
30
  klass = resolve_class(tokens.first)
30
- klass.new(*tokens[1..-1].compact)
31
+ tokens_arr = tokens.to_a
32
+ tokens_arr.pop while tokens_arr.last.nil?
33
+ tokens_arr.shift # Remove leading class marker
34
+ klass.new(*tokens_arr)
31
35
  rescue NameError
32
36
  tokens
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module Streamingly
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamingly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Gillooly