Class: Runbook::Statements::Assert

Inherits:
Runbook::Statement show all
Defined in:
lib/runbook/statements/assert.rb

Instance Attribute Summary collapse

Attributes inherited from Runbook::Statement

#parent

Instance Method Summary collapse

Methods inherited from Runbook::Statement

#render, #run

Methods included from Hooks::Invoker

#_execute_after_hooks, #_execute_around_hooks, #_execute_before_hooks, #invoke_with_hooks

Methods inherited from Node

#dynamic!, #dynamic?, #visited!, #visited?

Constructor Details

#initialize(cmd, cmd_ssh_config: nil, cmd_raw: false, interval: 1, timeout: 0, attempts: 0, timeout_statement: nil) ⇒ Assert

Returns a new instance of Assert.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/runbook/statements/assert.rb', line 7

def initialize(
  cmd,
  cmd_ssh_config: nil,
  cmd_raw: false,
  interval: 1,
  timeout: 0,
  attempts: 0,
  timeout_statement: nil
)
  @cmd = cmd
  @cmd_ssh_config = cmd_ssh_config
  @cmd_raw = cmd_raw
  @interval = interval
  @timeout = timeout
  @attempts = attempts
  @timeout_statement = timeout_statement
end

Instance Attribute Details

#attemptsObject (readonly)

Returns the value of attribute attempts.



4
5
6
# File 'lib/runbook/statements/assert.rb', line 4

def attempts
  @attempts
end

#cmdObject (readonly)

Returns the value of attribute cmd.



3
4
5
# File 'lib/runbook/statements/assert.rb', line 3

def cmd
  @cmd
end

#cmd_rawObject (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_configObject (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

#intervalObject (readonly)

Returns the value of attribute interval.



4
5
6
# File 'lib/runbook/statements/assert.rb', line 4

def interval
  @interval
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



4
5
6
# File 'lib/runbook/statements/assert.rb', line 4

def timeout
  @timeout
end

#timeout_statementObject (readonly)

Returns the value of attribute timeout_statement.



5
6
7
# File 'lib/runbook/statements/assert.rb', line 5

def timeout_statement
  @timeout_statement
end