Class: Suture::Value::Plan
- Inherits:
-
Object
- Object
- Suture::Value::Plan
- Defined in:
- lib/suture/value/plan.rb
Instance Attribute Summary collapse
-
#after_new ⇒ Object
readonly
Returns the value of attribute after_new.
-
#after_old ⇒ Object
readonly
Returns the value of attribute after_old.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#call_both ⇒ Object
readonly
Returns the value of attribute call_both.
-
#comparator ⇒ Object
readonly
Returns the value of attribute comparator.
-
#database_path ⇒ Object
readonly
Returns the value of attribute database_path.
-
#disable ⇒ Object
readonly
Returns the value of attribute disable.
-
#dup_args ⇒ Object
readonly
Returns the value of attribute dup_args.
-
#expected_error_types ⇒ Object
readonly
Returns the value of attribute expected_error_types.
-
#fallback_on_error ⇒ Object
readonly
Returns the value of attribute fallback_on_error.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#new ⇒ Object
readonly
Returns the value of attribute new.
-
#old ⇒ Object
readonly
Returns the value of attribute old.
-
#on_new_error ⇒ Object
readonly
Returns the value of attribute on_new_error.
-
#on_old_error ⇒ Object
readonly
Returns the value of attribute on_old_error.
-
#raise_on_result_mismatch ⇒ Object
readonly
Returns the value of attribute raise_on_result_mismatch.
-
#record_calls ⇒ Object
readonly
Returns the value of attribute record_calls.
-
#return_old_on_result_mismatch ⇒ Object
readonly
Returns the value of attribute return_old_on_result_mismatch.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Plan
constructor
A new instance of Plan.
Constructor Details
#initialize(attrs = {}) ⇒ Plan
Returns a new instance of Plan.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/suture/value/plan.rb', line 9 def initialize(attrs = {}) @name = attrs[:name] @old = attrs[:old] @new = attrs[:new] @args = attrs[:args] @after_new = attrs[:after_new] @after_old = attrs[:after_old] @on_new_error = attrs[:on_new_error] @on_old_error = attrs[:on_old_error] @database_path = attrs[:database_path] @record_calls = !!attrs[:record_calls] @comparator = attrs[:comparator] @call_both = !!attrs[:call_both] @raise_on_result_mismatch = !!attrs[:raise_on_result_mismatch] @return_old_on_result_mismatch = !!attrs[:return_old_on_result_mismatch] @fallback_on_error = !!attrs[:fallback_on_error] @expected_error_types = attrs[:expected_error_types] || [] @disable = !!attrs[:disable] @dup_args = !!attrs[:dup_args] end |
Instance Attribute Details
#after_new ⇒ Object (readonly)
Returns the value of attribute after_new.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def after_new @after_new end |
#after_old ⇒ Object (readonly)
Returns the value of attribute after_old.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def after_old @after_old end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def args @args end |
#call_both ⇒ Object (readonly)
Returns the value of attribute call_both.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def call_both @call_both end |
#comparator ⇒ Object (readonly)
Returns the value of attribute comparator.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def comparator @comparator end |
#database_path ⇒ Object (readonly)
Returns the value of attribute database_path.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def database_path @database_path end |
#disable ⇒ Object (readonly)
Returns the value of attribute disable.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def disable @disable end |
#dup_args ⇒ Object (readonly)
Returns the value of attribute dup_args.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def dup_args @dup_args end |
#expected_error_types ⇒ Object (readonly)
Returns the value of attribute expected_error_types.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def expected_error_types @expected_error_types end |
#fallback_on_error ⇒ Object (readonly)
Returns the value of attribute fallback_on_error.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def fallback_on_error @fallback_on_error end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def name @name end |
#new ⇒ Object (readonly)
Returns the value of attribute new.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def new @new end |
#old ⇒ Object (readonly)
Returns the value of attribute old.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def old @old end |
#on_new_error ⇒ Object (readonly)
Returns the value of attribute on_new_error.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def on_new_error @on_new_error end |
#on_old_error ⇒ Object (readonly)
Returns the value of attribute on_old_error.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def on_old_error @on_old_error end |
#raise_on_result_mismatch ⇒ Object (readonly)
Returns the value of attribute raise_on_result_mismatch.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def raise_on_result_mismatch @raise_on_result_mismatch end |
#record_calls ⇒ Object (readonly)
Returns the value of attribute record_calls.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def record_calls @record_calls end |
#return_old_on_result_mismatch ⇒ Object (readonly)
Returns the value of attribute return_old_on_result_mismatch.
3 4 5 |
# File 'lib/suture/value/plan.rb', line 3 def return_old_on_result_mismatch @return_old_on_result_mismatch end |