Class: LetsencryptWebfaction::Instructions
- Inherits:
-
Object
- Object
- LetsencryptWebfaction::Instructions
- Defined in:
- lib/letsencrypt_webfaction/instructions.rb
Instance Method Summary collapse
- #context(support_email: true) ⇒ Object
- #full_message(support_email: true) ⇒ Object
-
#initialize(output_dir, domains) ⇒ Instructions
constructor
A new instance of Instructions.
- #instructions ⇒ Object
Constructor Details
#initialize(output_dir, domains) ⇒ Instructions
3 4 5 6 |
# File 'lib/letsencrypt_webfaction/instructions.rb', line 3 def initialize(output_dir, domains) @output_dir = output_dir @domains = domains end |
Instance Method Details
#context(support_email: true) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/letsencrypt_webfaction/instructions.rb', line 8 def context(support_email: true) out = 'LetsEncrypt Webfaction has generated a new certificate for ' \ "#{to_sentence @domains}. The certificates have been placed in " \ "#{@output_dir}. " out << if support_email 'WebFaction support has been contacted with the following message:' else 'Go to https://help.webfaction.com, log in, and paste the ' \ 'following text into a new ticket:' end out end |
#full_message(support_email: true) ⇒ Object
28 29 30 |
# File 'lib/letsencrypt_webfaction/instructions.rb', line 28 def (support_email: true) context(support_email: support_email) + "\n\n" + instructions end |
#instructions ⇒ Object
23 24 25 26 |
# File 'lib/letsencrypt_webfaction/instructions.rb', line 23 def instructions "Please apply the new certificate in #{@output_dir} to " \ "#{to_sentence @domains}. Thanks!" end |