Class: Contracts::Configuration
- Inherits:
-
Object
- Object
- Contracts::Configuration
- Defined in:
- lib/contracts.rb
Defined Under Namespace
Classes: Profile
Instance Attribute Summary collapse
-
#allow_invariant_suppression ⇒ Object
Returns the value of attribute allow_invariant_suppression.
-
#allow_private_state_readers ⇒ Object
Returns the value of attribute allow_private_state_readers.
-
#capture_source_locations ⇒ Object
Returns the value of attribute capture_source_locations.
-
#check_invariant_after_exception ⇒ Object
Returns the value of attribute check_invariant_after_exception.
-
#check_invariants_after_initialize ⇒ Object
Returns the value of attribute check_invariants_after_initialize.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#failure_mode ⇒ Object
Returns the value of attribute failure_mode.
-
#include_values_in_errors ⇒ Object
Returns the value of attribute include_values_in_errors.
-
#inheritance_mode ⇒ Object
Returns the value of attribute inheritance_mode.
-
#invariant_checking ⇒ Object
Returns the value of attribute invariant_checking.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#redacted_parameters ⇒ Object
Returns the value of attribute redacted_parameters.
-
#redactor ⇒ Object
Returns the value of attribute redactor.
-
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
-
#sampler ⇒ Object
Returns the value of attribute sampler.
-
#snapshot_provider ⇒ Object
Returns the value of attribute snapshot_provider.
-
#snapshot_strategy ⇒ Object
Returns the value of attribute snapshot_strategy.
-
#state_equality ⇒ Object
Returns the value of attribute state_equality.
-
#undeclared_exceptions ⇒ Object
Returns the value of attribute undeclared_exceptions.
-
#unsupported_deep_copy ⇒ Object
Returns the value of attribute unsupported_deep_copy.
-
#verify_state_after_exception ⇒ Object
Returns the value of attribute verify_state_after_exception.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #profile(_name) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/contracts.rb', line 70 def initialize @enabled = true @failure_mode = :raise @sample_rate = 1.0 @logger = nil @include_values_in_errors = false @capture_source_locations = true @undeclared_exceptions = :ignore @invariant_checking = :contracted_methods @inheritance_mode = :merge @snapshot_strategy = :declared @sampler = nil @redacted_parameters = SENSITIVE_NAMES.dup @redactor = nil @check_invariant_after_exception = false @check_invariants_after_initialize = true @snapshot_provider = nil @allow_private_state_readers = true @unsupported_deep_copy = :reference @state_equality = :eql @verify_state_after_exception = false @allow_invariant_suppression = false end |
Instance Attribute Details
#allow_invariant_suppression ⇒ Object
Returns the value of attribute allow_invariant_suppression.
67 68 69 |
# File 'lib/contracts.rb', line 67 def allow_invariant_suppression @allow_invariant_suppression end |
#allow_private_state_readers ⇒ Object
Returns the value of attribute allow_private_state_readers.
67 68 69 |
# File 'lib/contracts.rb', line 67 def allow_private_state_readers @allow_private_state_readers end |
#capture_source_locations ⇒ Object
Returns the value of attribute capture_source_locations.
67 68 69 |
# File 'lib/contracts.rb', line 67 def capture_source_locations @capture_source_locations end |
#check_invariant_after_exception ⇒ Object
Returns the value of attribute check_invariant_after_exception.
67 68 69 |
# File 'lib/contracts.rb', line 67 def check_invariant_after_exception @check_invariant_after_exception end |
#check_invariants_after_initialize ⇒ Object
Returns the value of attribute check_invariants_after_initialize.
67 68 69 |
# File 'lib/contracts.rb', line 67 def check_invariants_after_initialize @check_invariants_after_initialize end |
#enabled ⇒ Object
Returns the value of attribute enabled.
67 68 69 |
# File 'lib/contracts.rb', line 67 def enabled @enabled end |
#failure_mode ⇒ Object
Returns the value of attribute failure_mode.
67 68 69 |
# File 'lib/contracts.rb', line 67 def failure_mode @failure_mode end |
#include_values_in_errors ⇒ Object
Returns the value of attribute include_values_in_errors.
67 68 69 |
# File 'lib/contracts.rb', line 67 def include_values_in_errors @include_values_in_errors end |
#inheritance_mode ⇒ Object
Returns the value of attribute inheritance_mode.
67 68 69 |
# File 'lib/contracts.rb', line 67 def inheritance_mode @inheritance_mode end |
#invariant_checking ⇒ Object
Returns the value of attribute invariant_checking.
67 68 69 |
# File 'lib/contracts.rb', line 67 def invariant_checking @invariant_checking end |
#logger ⇒ Object
Returns the value of attribute logger.
67 68 69 |
# File 'lib/contracts.rb', line 67 def logger @logger end |
#redacted_parameters ⇒ Object
Returns the value of attribute redacted_parameters.
67 68 69 |
# File 'lib/contracts.rb', line 67 def redacted_parameters @redacted_parameters end |
#redactor ⇒ Object
Returns the value of attribute redactor.
67 68 69 |
# File 'lib/contracts.rb', line 67 def redactor @redactor end |
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
67 68 69 |
# File 'lib/contracts.rb', line 67 def sample_rate @sample_rate end |
#sampler ⇒ Object
Returns the value of attribute sampler.
67 68 69 |
# File 'lib/contracts.rb', line 67 def sampler @sampler end |
#snapshot_provider ⇒ Object
Returns the value of attribute snapshot_provider.
67 68 69 |
# File 'lib/contracts.rb', line 67 def snapshot_provider @snapshot_provider end |
#snapshot_strategy ⇒ Object
Returns the value of attribute snapshot_strategy.
67 68 69 |
# File 'lib/contracts.rb', line 67 def snapshot_strategy @snapshot_strategy end |
#state_equality ⇒ Object
Returns the value of attribute state_equality.
67 68 69 |
# File 'lib/contracts.rb', line 67 def state_equality @state_equality end |
#undeclared_exceptions ⇒ Object
Returns the value of attribute undeclared_exceptions.
67 68 69 |
# File 'lib/contracts.rb', line 67 def undeclared_exceptions @undeclared_exceptions end |
#unsupported_deep_copy ⇒ Object
Returns the value of attribute unsupported_deep_copy.
67 68 69 |
# File 'lib/contracts.rb', line 67 def unsupported_deep_copy @unsupported_deep_copy end |
#verify_state_after_exception ⇒ Object
Returns the value of attribute verify_state_after_exception.
67 68 69 |
# File 'lib/contracts.rb', line 67 def verify_state_after_exception @verify_state_after_exception end |