Class: RightDevelop::Testing::Recording::Metadata::MissingVariableFailure
- Inherits:
-
RetryableFailure
- Object
- RetryableFailure
- RightDevelop::Testing::Recording::Metadata::MissingVariableFailure
- Defined in:
- lib/right_develop/testing/recording/metadata.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
-
#variable_array_index ⇒ Object
readonly
Returns the value of attribute variable_array_index.
-
#variable_array_size ⇒ Object
readonly
Returns the value of attribute variable_array_size.
Instance Method Summary collapse
-
#initialize(options) ⇒ MissingVariableFailure
constructor
A new instance of MissingVariableFailure.
- #message ⇒ Object
Constructor Details
#initialize(options) ⇒ MissingVariableFailure
Returns a new instance of MissingVariableFailure.
65 66 67 68 69 70 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 65 def initialize() @path = [:path] or raise ::ArgumentError, 'options[:path] is required' @variable = [:variable] or raise ::ArgumentError, 'options[:variable] is required' @variable_array_index = [:variable_array_index] || 0 @variable_array_size = [:variable_array_size] || 0 end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
63 64 65 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 63 def path @path end |
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
63 64 65 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 63 def variable @variable end |
#variable_array_index ⇒ Object (readonly)
Returns the value of attribute variable_array_index.
63 64 65 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 63 def variable_array_index @variable_array_index end |
#variable_array_size ⇒ Object (readonly)
Returns the value of attribute variable_array_size.
63 64 65 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 63 def variable_array_size @variable_array_size end |
Instance Method Details
#message ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/right_develop/testing/recording/metadata.rb', line 72 def if (0 == variable_array_size) result = 'A variable was never defined by request ' else result = 'A variable index is past the range of values defined by request ' << "(#{variable_array_index} >= #{variable_array_size}) " end result << "while replacing variable = #{variable.inspect} at " << path.join('/').inspect end |