Class: Suture::Value::Plan

Inherits:
Object
  • Object
show all
Defined in:
lib/suture/value/plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_newObject (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_oldObject (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

#argsObject (readonly)

Returns the value of attribute args.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def args
  @args
end

#call_bothObject (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

#comparatorObject (readonly)

Returns the value of attribute comparator.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def comparator
  @comparator
end

#database_pathObject (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

#disableObject (readonly)

Returns the value of attribute disable.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def disable
  @disable
end

#dup_argsObject (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_typesObject (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_errorObject (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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def name
  @name
end

#newObject (readonly)

Returns the value of attribute new.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def new
  @new
end

#oldObject (readonly)

Returns the value of attribute old.



3
4
5
# File 'lib/suture/value/plan.rb', line 3

def old
  @old
end

#on_new_errorObject (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_errorObject (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_mismatchObject (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_callsObject (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_mismatchObject (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