Class: EmailNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2launcher/email_notification.rb

Instance Method Summary collapse

Constructor Details

#initializeEmailNotification

Returns a new instance of EmailNotification.



15
16
# File 'lib/ec2launcher/email_notification.rb', line 15

def initialize()
end

Instance Method Details

#from(*from) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/ec2launcher/email_notification.rb', line 18

def from(*from)
  if from.empty?
    @from
  else
    @from = from[0]
    self
  end
end

#ses_access_key(*ses_access_key) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/ec2launcher/email_notification.rb', line 36

def ses_access_key(*ses_access_key)
  if ses_access_key.empty?
    @ses_access_key
  else
    @ses_access_key = ses_access_key[0]
    self
  end
end

#ses_secret_key(*ses_secret_key) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/ec2launcher/email_notification.rb', line 45

def ses_secret_key(*ses_secret_key)
  if ses_secret_key.empty?
    @ses_secret_key
  else
    @ses_secret_key = ses_secret_key[0]
    self
  end
end

#to(*to) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/ec2launcher/email_notification.rb', line 27

def to(*to)
  if to.empty?
    @to
  else
    @to = to[0]
    self
  end
end

#to_json(*a) ⇒ Object



54
55
56
57
58
59
60
61
# File 'lib/ec2launcher/email_notification.rb', line 54

def to_json(*a)
  {
    "from" => @from,
    "to" => @to,
    "ses_access_key" => @ses_access_key,
    "ses_secret_key" => @ses_secret_key
  }.to_json(*a)
end