Class: MimiCheck::Checker
- Inherits:
-
Object
- Object
- MimiCheck::Checker
- Extended by:
- TailCallOptimization
- Defined in:
- lib/mimicheck/checker.rb
Instance Attribute Summary collapse
-
#examples ⇒ Object
readonly
Returns the value of attribute examples.
-
#generators ⇒ Object
readonly
Returns the value of attribute generators.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#trials ⇒ Object
readonly
Returns the value of attribute trials.
Class Method Summary collapse
Instance Method Summary collapse
- #check(gens = nil) ⇒ Object
- #check_examples(exs = nil) ⇒ Object
- #with(trials: nil, generators: nil, examples: nil) ⇒ Object
Methods included from TailCallOptimization
Instance Attribute Details
#examples ⇒ Object (readonly)
Returns the value of attribute examples.
5 6 7 |
# File 'lib/mimicheck/checker.rb', line 5 def examples @examples end |
#generators ⇒ Object (readonly)
Returns the value of attribute generators.
5 6 7 |
# File 'lib/mimicheck/checker.rb', line 5 def generators @generators end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
5 6 7 |
# File 'lib/mimicheck/checker.rb', line 5 def property @property end |
#trials ⇒ Object (readonly)
Returns the value of attribute trials.
5 6 7 |
# File 'lib/mimicheck/checker.rb', line 5 def trials @trials end |
Class Method Details
.for(proc, &blk) ⇒ Object
7 8 9 |
# File 'lib/mimicheck/checker.rb', line 7 def self.for(proc, &blk) new(proc || blk).with end |
Instance Method Details
#check(gens = nil) ⇒ Object
19 20 21 |
# File 'lib/mimicheck/checker.rb', line 19 def check(gens = nil) check! Array(gens || generators) end |
#check_examples(exs = nil) ⇒ Object
23 24 25 |
# File 'lib/mimicheck/checker.rb', line 23 def check_examples(exs = nil) check_examples! Array(exs || examples) end |
#with(trials: nil, generators: nil, examples: nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/mimicheck/checker.rb', line 11 def with(trials: nil, generators: nil, examples: nil) tap do @trials = trials if trials @generators = generators if generators @examples = examples if examples end end |