Class: Mutant::Runner
- Inherits:
-
Object
- Object
- Mutant::Runner
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/mutant/runner.rb,
lib/mutant/runner/config.rb,
lib/mutant/runner/subject.rb,
lib/mutant/runner/mutation.rb
Overview
Runner baseclass
Defined Under Namespace
Classes: Config, Mutation, Subject
Constant Summary collapse
- REGISTRY =
{}
Instance Attribute Summary collapse
-
#config ⇒ Mutant::Config
readonly
private
Return config.
Class Method Summary collapse
-
.run(config, object) ⇒ Runner
private
Run runner for object.
Instance Method Summary collapse
-
#initialize(config) ⇒ undefined
constructor
private
Initialize object.
-
#reporter ⇒ Reporter
private
Return reporter.
-
#runtime ⇒ Float
private
Return runtime.
-
#stop? ⇒ true, false
private
Test if runner should stop.
-
#success? ⇒ true, false
private
Test if runner is successful.
Constructor Details
#initialize(config) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
72 73 74 75 76 77 78 |
# File 'lib/mutant/runner.rb', line 72 def initialize(config) @config = config @stop = false @start = Time.now run @end = Time.now end |
Instance Attribute Details
#config ⇒ Mutant::Config (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return config
62 63 64 |
# File 'lib/mutant/runner.rb', line 62 def config @config end |
Class Method Details
.run(config, object) ⇒ Runner
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run runner for object
51 52 53 54 |
# File 'lib/mutant/runner.rb', line 51 def self.run(config, object) handler = lookup(object.class) handler.new(config, object) end |
Instance Method Details
#reporter ⇒ Reporter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return reporter
110 111 112 |
# File 'lib/mutant/runner.rb', line 110 def reporter config.reporter end |
#runtime ⇒ Float
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return runtime
100 101 102 |
# File 'lib/mutant/runner.rb', line 100 def runtime (@end || Time.now) - @start end |
#stop? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if runner should stop
90 91 92 |
# File 'lib/mutant/runner.rb', line 90 def stop? @stop end |
#success? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if runner is successful
124 |
# File 'lib/mutant/runner.rb', line 124 abstract_method :success? |