Class: FluentCommandBuilder::BackticksExecutor
- Inherits:
-
ExecutorBase
- Object
- ExecutorBase
- FluentCommandBuilder::BackticksExecutor
- Defined in:
- lib/fluent_command_builder/command_executors/backticks_executor.rb
Instance Attribute Summary collapse
-
#password_formatter ⇒ Object
Returns the value of attribute password_formatter.
-
#passwords ⇒ Object
Returns the value of attribute passwords.
Instance Method Summary collapse
- #do_execute(command) ⇒ Object
-
#initialize ⇒ BackticksExecutor
constructor
A new instance of BackticksExecutor.
Methods inherited from ExecutorBase
#execute, #will_fail_on_error?, #will_print_on_execute?
Constructor Details
#initialize ⇒ BackticksExecutor
Returns a new instance of BackticksExecutor.
8 9 10 11 |
# File 'lib/fluent_command_builder/command_executors/backticks_executor.rb', line 8 def initialize @password_formatter = FluentCommandBuilder.password_formatter @passwords = [] end |
Instance Attribute Details
#password_formatter ⇒ Object
Returns the value of attribute password_formatter.
6 7 8 |
# File 'lib/fluent_command_builder/command_executors/backticks_executor.rb', line 6 def password_formatter @password_formatter end |
#passwords ⇒ Object
Returns the value of attribute passwords.
6 7 8 |
# File 'lib/fluent_command_builder/command_executors/backticks_executor.rb', line 6 def passwords @passwords end |
Instance Method Details
#do_execute(command) ⇒ Object
13 14 15 16 |
# File 'lib/fluent_command_builder/command_executors/backticks_executor.rb', line 13 def do_execute(command) output = `#{command}` @password_formatter.format output, @passwords end |