Class: EasyCaddy::Commands::Ensure
- Inherits:
-
Object
- Object
- EasyCaddy::Commands::Ensure
- Includes:
- RegisterHelpers
- Defined in:
- lib/easy_caddy/commands/ensure.rb
Overview
One-shot: copies the project Caddyfile into global sites/, reloads Caddy, then exits. Site stays registered until ‘ecaddy down NAME` or `ecaddy remove NAME`.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config_path:, site:) ⇒ Ensure
constructor
A new instance of Ensure.
Constructor Details
#initialize(config_path:, site:) ⇒ Ensure
Returns a new instance of Ensure.
12 13 14 15 |
# File 'lib/easy_caddy/commands/ensure.rb', line 12 def initialize(config_path:, site:) @config_path = config_path @site = site end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'lib/easy_caddy/commands/ensure.rb', line 17 def call register(@config_path, @site) end |