Class: Runbook::Statements::Assert
- Inherits:
-
Runbook::Statement
- Object
- Node
- Runbook::Statement
- Runbook::Statements::Assert
- Defined in:
- lib/runbook/statements/assert.rb
Instance Attribute Summary collapse
-
#abort_statement ⇒ Object
readonly
Returns the value of attribute abort_statement.
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#cmd_raw ⇒ Object
readonly
Returns the value of attribute cmd_raw.
-
#cmd_ssh_config ⇒ Object
readonly
Returns the value of attribute cmd_ssh_config.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(cmd, cmd_ssh_config: nil, cmd_raw: false, interval: 1, timeout: 0, attempts: 0, abort_statement: nil, timeout_statement: nil) ⇒ Assert
constructor
A new instance of Assert.
- #timeout_statement ⇒ Object
Methods inherited from Runbook::Statement
Methods included from Hooks::Invoker
#_execute_after_hooks, #_execute_around_hooks, #_execute_before_hooks, #invoke_with_hooks
Methods inherited from Node
#dynamic!, #dynamic?, #parent_entity, #visited!, #visited?
Constructor Details
#initialize(cmd, cmd_ssh_config: nil, cmd_raw: false, interval: 1, timeout: 0, attempts: 0, abort_statement: nil, timeout_statement: nil) ⇒ Assert
Returns a new instance of Assert.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/runbook/statements/assert.rb', line 12 def initialize( cmd, cmd_ssh_config: nil, cmd_raw: false, interval: 1, timeout: 0, attempts: 0, abort_statement: nil, timeout_statement: nil ) @cmd = cmd @cmd_ssh_config = cmd_ssh_config @cmd_raw = cmd_raw @interval = interval @timeout = timeout @attempts = attempts if timeout_statement Runbook.deprecator.deprecation_warning(:timeout_statement, :abort_statement) end @abort_statement = abort_statement || timeout_statement end |
Instance Attribute Details
#abort_statement ⇒ Object (readonly)
Returns the value of attribute abort_statement.
5 6 7 |
# File 'lib/runbook/statements/assert.rb', line 5 def abort_statement @abort_statement end |
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
4 5 6 |
# File 'lib/runbook/statements/assert.rb', line 4 def attempts @attempts end |
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
3 4 5 |
# File 'lib/runbook/statements/assert.rb', line 3 def cmd @cmd end |
#cmd_raw ⇒ Object (readonly)
Returns the value of attribute cmd_raw.
3 4 5 |
# File 'lib/runbook/statements/assert.rb', line 3 def cmd_raw @cmd_raw end |
#cmd_ssh_config ⇒ Object (readonly)
Returns the value of attribute cmd_ssh_config.
3 4 5 |
# File 'lib/runbook/statements/assert.rb', line 3 def cmd_ssh_config @cmd_ssh_config end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
4 5 6 |
# File 'lib/runbook/statements/assert.rb', line 4 def interval @interval end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
4 5 6 |
# File 'lib/runbook/statements/assert.rb', line 4 def timeout @timeout end |
Instance Method Details
#timeout_statement ⇒ Object
7 8 9 10 |
# File 'lib/runbook/statements/assert.rb', line 7 def timeout_statement Runbook.deprecator.deprecation_warning(:timeout_statement, :abort_statement) @abort_statement end |