Class: SSHake::ExecutionOptionsDSL
- Inherits:
-
Object
- Object
- SSHake::ExecutionOptionsDSL
- Defined in:
- lib/sshake/execution_options_dsl.rb
Instance Method Summary collapse
-
#dont_raise_on_error ⇒ Object
rubocop:enable Style/OptionalBooleanParameter.
- #file_to_stream(file) ⇒ Object
-
#initialize(options) ⇒ ExecutionOptionsDSL
constructor
A new instance of ExecutionOptionsDSL.
-
#raise_on_error(bool = true) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter.
- #stderr(&block) ⇒ Object
- #stdin(value) ⇒ Object
- #stdout(&block) ⇒ Object
- #sudo(options = {}) ⇒ Object
- #timeout(timeout) ⇒ Object
Constructor Details
#initialize(options) ⇒ ExecutionOptionsDSL
Returns a new instance of ExecutionOptionsDSL.
6 7 8 |
# File 'lib/sshake/execution_options_dsl.rb', line 6 def initialize() @options = end |
Instance Method Details
#dont_raise_on_error ⇒ Object
rubocop:enable Style/OptionalBooleanParameter
25 26 27 |
# File 'lib/sshake/execution_options_dsl.rb', line 25 def dont_raise_on_error @options.raise_on_error = false end |
#file_to_stream(file) ⇒ Object
41 42 43 |
# File 'lib/sshake/execution_options_dsl.rb', line 41 def file_to_stream(file) @options.file_to_stream = file end |
#raise_on_error(bool = true) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter
20 21 22 |
# File 'lib/sshake/execution_options_dsl.rb', line 20 def raise_on_error(bool = true) @options.raise_on_error = bool end |
#stderr(&block) ⇒ Object
37 38 39 |
# File 'lib/sshake/execution_options_dsl.rb', line 37 def stderr(&block) @options.stderr = block end |
#stdin(value) ⇒ Object
29 30 31 |
# File 'lib/sshake/execution_options_dsl.rb', line 29 def stdin(value) @options.stdin = value end |
#stdout(&block) ⇒ Object
33 34 35 |
# File 'lib/sshake/execution_options_dsl.rb', line 33 def stdout(&block) @options.stdout = block end |
#sudo(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/sshake/execution_options_dsl.rb', line 14 def sudo( = {}) @options.sudo_user = [:user] || 'root' @options.sudo_password = [:password] end |
#timeout(timeout) ⇒ Object
10 11 12 |
# File 'lib/sshake/execution_options_dsl.rb', line 10 def timeout(timeout) @options.timeout = timeout end |