email_list 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,12 +30,13 @@ class EmailList
30
30
  attr_reader :emails
31
31
 
32
32
  def initialize(email_list)
33
- if email_list.respond_to? :split
33
+ case email_list
34
+ when String
34
35
  @emails = email_list.split(/,|;\s?/).map &:strip
35
- elsif email_list.nil?
36
- @emails = []
37
- else
36
+ when Array
38
37
  @emails = email_list
38
+ when NilClass
39
+ @emails = []
39
40
  end
40
41
  end
41
42
 
@@ -1,3 +1,3 @@
1
1
  class EmailList
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: