Class: Ruby::Nginx::Commands::RemoveNginxConfig
- Inherits:
-
Object
- Object
- Ruby::Nginx::Commands::RemoveNginxConfig
- Includes:
- Ruby::Nginx::Constants
- Defined in:
- lib/ruby/nginx/commands/remove_nginx_config.rb
Constant Summary
Constants included from Ruby::Nginx::Constants
Ruby::Nginx::Constants::CONFIG_PATH, Ruby::Nginx::Constants::SERVERS_PATH
Instance Method Summary collapse
-
#initialize(name) ⇒ RemoveNginxConfig
constructor
A new instance of RemoveNginxConfig.
- #run ⇒ Object
Constructor Details
#initialize(name) ⇒ RemoveNginxConfig
Returns a new instance of RemoveNginxConfig.
12 13 14 |
# File 'lib/ruby/nginx/commands/remove_nginx_config.rb', line 12 def initialize(name) @name = name end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 |
# File 'lib/ruby/nginx/commands/remove_nginx_config.rb', line 16 def run return false unless exists? Ruby::Nginx::System::SafeFile.rm(config_path) true end |