Class: Mutant::Env
- Inherits:
-
Object
- Object
- Mutant::Env
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/env.rb
Overview
Abstract base class for mutant environments
Constant Summary collapse
- SEMANTICS_MESSAGE =
"Fix your lib to follow normal ruby semantics!\n" \ '{Module,Class}#name should return resolvable constant name as String or nil'.freeze
Instance Attribute Summary collapse
-
#matchable_scopes ⇒ Array<Matcher::Scope>
readonly
private
Return all usable match scopes.
-
#mutations ⇒ Array<Mutation>
readonly
private
Return mutations.
-
#subjects ⇒ Array<Subject>
readonly
private
Return subjects.
Class Method Summary collapse
-
.new(config, cache = Cache.new) ⇒ Env
private
Return new env.
Instance Method Summary collapse
-
#initialize ⇒ undefined
constructor
private
Initialize env.
-
#warn(message) ⇒ self
private
Print warning message.
Constructor Details
#initialize ⇒ 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 env
28 29 30 31 32 33 34 35 |
# File 'lib/mutant/env.rb', line 28 def initialize(*) super infect initialize_matchable_scopes initialize_subjects initialize_mutations end |
Instance Attribute Details
#matchable_scopes ⇒ Array<Matcher::Scope> (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 all usable match scopes
72 73 74 |
# File 'lib/mutant/env.rb', line 72 def matchable_scopes @matchable_scopes end |
#mutations ⇒ Array<Mutation> (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 mutations
64 65 66 |
# File 'lib/mutant/env.rb', line 64 def mutations @mutations end |
#subjects ⇒ Array<Subject> (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 subjects
56 57 58 |
# File 'lib/mutant/env.rb', line 56 def subjects @subjects end |
Class Method Details
Instance Method Details
#warn(message) ⇒ self
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.
Print warning message
45 46 47 48 |
# File 'lib/mutant/env.rb', line 45 def warn() config.reporter.warn() self end |