freya 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0592dd35545824e9ab77d0b678ac36ba3908e33d
4
- data.tar.gz: 4e6d3ef0becf97cdb21fc2a026736ffb7b45c6bc
3
+ metadata.gz: ee0cf741505e141c70e5588398c6485f55cb91fe
4
+ data.tar.gz: fa10cc2a0e74e6fa7d5f72a129e5c5b6e0b76afd
5
5
  SHA512:
6
- metadata.gz: bdf7a25d67df80d7b1ecad7bfc513b9363ad3abf081108a1b498a2af32212ec59b40541f43ab8aa03407898a5e0bb0f01bc4dfaa5d762ee713bbddb5a4c5307f
7
- data.tar.gz: 561fba7872fd5cb4deaca09260374747d25a49b7dfa1ff229d34e8e6318810c75bbb59f524f4036168684d7d3289bb785a220918d82728147c0d6ac1c13866a9
6
+ metadata.gz: c5449860e7dbb32aba3b5bced7fea1dbfc0c1ae9265d2581f681c068600b9b4f521e62692c84e76238f56f4e890b1ea442e958e7a3f2fc5dd798274b77641aa2
7
+ data.tar.gz: 8337a019c39a586bb10b4b1afa1111738fb0a962030cfe5d6f97d0804b52f5c49b6bc3d8331cce1ff81d19a4aa499ecbabef34c6713b5689141774b5af4c0a68
@@ -26,12 +26,12 @@ module Freya
26
26
  class Email
27
27
  attr_accessor :name, :to, :subject, :cc, :bcc
28
28
 
29
- def initialize(name: nil, to: nil, subject: nil, cc: [], bcc: [])
30
- @name = name
31
- @to = to
32
- @subject = subject
33
- @cc = cc
34
- @bcc = bcc
29
+ def initialize(options = {})
30
+ @name = options[:name]
31
+ @to = options[:to]
32
+ @subject = options[:subject]
33
+ @cc = options[:cc] || []
34
+ @bcc = options[:bcc] || []
35
35
  end
36
36
 
37
37
  def link
@@ -1,3 +1,3 @@
1
1
  module Freya
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -57,7 +57,7 @@ describe Freya::Email do
57
57
 
58
58
  describe '#bcc' do
59
59
  it "doesn't contain #to email" do
60
- Freya::Email.new(name: 'test_email', to: 'test@test.com', cc: ['test@test.com', 'test1@test.com']).cc.should eq(['test1@test.com'])
60
+ Freya::Email.new(name: 'test_email', to: 'test@test.com', bcc: ['test@test.com', 'test1@test.com']).bcc.should eq(['test1@test.com'])
61
61
  end
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Depalo