Class: LetsencryptWebfaction::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/letsencrypt_webfaction/application.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Application

Returns a new instance of Application.



12
13
14
# File 'lib/letsencrypt_webfaction/application.rb', line 12

def initialize(args)
  @options = LetsencryptWebfaction::ArgsParser.new(args)
end

Instance Method Details

#run!Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/letsencrypt_webfaction/application.rb', line 16

def run!
  # Validate that the correct options were passed.
  validate_options!

  # Register the private key.
  register_key!

  # Validate the domains.
  validator.validate!

  # Write the obtained certificates.
  certificate_writer.write!

  # Send emails.
  emailer.send!
end