Class: PropCheck::Property::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/prop_check/property/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verbose: false, n_runs: 100, max_generate_attempts: 10_000, max_shrink_steps: 10_000, max_consecutive_attempts: 30) ⇒ Configuration

Returns a new instance of Configuration.


11
12
13
14
15
16
17
18
19
# File 'lib/prop_check/property/configuration.rb', line 11

def initialize(
      verbose: false,
      n_runs: 100,
      max_generate_attempts: 10_000,
      max_shrink_steps: 10_000,
      max_consecutive_attempts: 30
    )
  super
end

Instance Attribute Details

#max_consecutive_attemptsObject

Returns the value of attribute max_consecutive_attempts

Returns:

  • (Object)

    the current value of max_consecutive_attempts


3
4
5
# File 'lib/prop_check/property/configuration.rb', line 3

def max_consecutive_attempts
  @max_consecutive_attempts
end

#max_generate_attemptsObject

Returns the value of attribute max_generate_attempts

Returns:

  • (Object)

    the current value of max_generate_attempts


3
4
5
# File 'lib/prop_check/property/configuration.rb', line 3

def max_generate_attempts
  @max_generate_attempts
end

#max_shrink_stepsObject

Returns the value of attribute max_shrink_steps

Returns:

  • (Object)

    the current value of max_shrink_steps


3
4
5
# File 'lib/prop_check/property/configuration.rb', line 3

def max_shrink_steps
  @max_shrink_steps
end

#n_runsObject

Returns the value of attribute n_runs

Returns:

  • (Object)

    the current value of n_runs


3
4
5
# File 'lib/prop_check/property/configuration.rb', line 3

def n_runs
  @n_runs
end

#verboseObject

Returns the value of attribute verbose

Returns:

  • (Object)

    the current value of verbose


3
4
5
# File 'lib/prop_check/property/configuration.rb', line 3

def verbose
  @verbose
end

Instance Method Details

#merge(other) ⇒ Object


21
22
23
# File 'lib/prop_check/property/configuration.rb', line 21

def merge(other)
  Configuration.new(**self.to_h.merge(other.to_h))
end