Class: EC2Launcher::DSL::EmailNotification

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

Instance Method Summary collapse

Constructor Details

#initializeEmailNotification

Returns a new instance of EmailNotification.



18
19
# File 'lib/ec2launcher/dsl/email_notification.rb', line 18

def initialize()
end

Instance Method Details

#from(*from) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/ec2launcher/dsl/email_notification.rb', line 21

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

#ses_access_key(*ses_access_key) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/ec2launcher/dsl/email_notification.rb', line 39

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



48
49
50
51
52
53
54
55
# File 'lib/ec2launcher/dsl/email_notification.rb', line 48

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



30
31
32
33
34
35
36
37
# File 'lib/ec2launcher/dsl/email_notification.rb', line 30

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

#to_json(*a) ⇒ Object



57
58
59
60
61
62
63
64
# File 'lib/ec2launcher/dsl/email_notification.rb', line 57

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