Class: Ruby::Nginx::Commands::NginxOptions
- Inherits:
-
TerminalCommand
- Object
- TerminalCommand
- Ruby::Nginx::Commands::NginxOptions
- Defined in:
- lib/ruby/nginx/commands/nginx_options.rb
Instance Attribute Summary
Attributes inherited from TerminalCommand
#cmd, #error_type, #printer, #result, #user
Instance Method Summary collapse
-
#initialize ⇒ NginxOptions
constructor
A new instance of NginxOptions.
- #run ⇒ Object
Methods included from Helpers::SudoHelper
Methods included from Helpers::PromptHelper
Constructor Details
#initialize ⇒ NginxOptions
Returns a new instance of NginxOptions.
9 10 11 |
# File 'lib/ruby/nginx/commands/nginx_options.rb', line 9 def initialize super(cmd: "nginx -V", raise: Ruby::Nginx::Error) end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ruby/nginx/commands/nginx_options.rb', line 13 def run super # nginx -V outputs to stderr format_output(result.stderr) end |