email_list 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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: