Class: Mutant::Mutator Private
- Inherits:
-
Object
- Object
- Mutant::Mutator
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/mutant/mutator.rb,
lib/mutant/mutator/node.rb,
lib/mutant/mutator/util.rb,
lib/mutant/mutator/node/if.rb,
lib/mutant/mutator/node/case.rb,
lib/mutant/mutator/node/dstr.rb,
lib/mutant/mutator/node/dsym.rb,
lib/mutant/mutator/node/mlhs.rb,
lib/mutant/mutator/node/next.rb,
lib/mutant/mutator/node/noop.rb,
lib/mutant/mutator/node/send.rb,
lib/mutant/mutator/node/when.rb,
lib/mutant/mutator/node/begin.rb,
lib/mutant/mutator/node/block.rb,
lib/mutant/mutator/node/break.rb,
lib/mutant/mutator/node/class.rb,
lib/mutant/mutator/node/const.rb,
lib/mutant/mutator/node/masgn.rb,
lib/mutant/mutator/node/splat.rb,
lib/mutant/mutator/node/super.rb,
lib/mutant/mutator/node/yield.rb,
lib/mutant/mutator/util/array.rb,
lib/mutant/mutator/node/binary.rb,
lib/mutant/mutator/node/define.rb,
lib/mutant/mutator/node/nthref.rb,
lib/mutant/mutator/node/regexp.rb,
lib/mutant/mutator/node/regopt.rb,
lib/mutant/mutator/node/rescue.rb,
lib/mutant/mutator/node/return.rb,
lib/mutant/mutator/node/zsuper.rb,
lib/mutant/mutator/util/symbol.rb,
lib/mutant/mutator/node/defined.rb,
lib/mutant/mutator/node/generic.rb,
lib/mutant/mutator/node/kwbegin.rb,
lib/mutant/mutator/node/literal.rb,
lib/mutant/mutator/node/op_asgn.rb,
lib/mutant/mutator/node/or_asgn.rb,
lib/mutant/mutator/node/resbody.rb,
lib/mutant/mutator/node/and_asgn.rb,
lib/mutant/mutator/node/argument.rb,
lib/mutant/mutator/node/arguments.rb,
lib/mutant/mutator/node/send/index.rb,
lib/mutant/mutator/node/literal/nil.rb,
lib/mutant/mutator/node/send/binary.rb,
lib/mutant/mutator/node/literal/hash.rb,
lib/mutant/mutator/node/literal/array.rb,
lib/mutant/mutator/node/literal/float.rb,
lib/mutant/mutator/node/literal/range.rb,
lib/mutant/mutator/node/literal/regex.rb,
lib/mutant/mutator/node/literal/fixnum.rb,
lib/mutant/mutator/node/literal/string.rb,
lib/mutant/mutator/node/literal/symbol.rb,
lib/mutant/mutator/node/literal/boolean.rb,
lib/mutant/mutator/node/conditional_loop.rb,
lib/mutant/mutator/node/send/conditional.rb,
lib/mutant/mutator/node/match_current_line.rb,
lib/mutant/mutator/node/named_value/access.rb,
lib/mutant/mutator/node/send/attribute_assignment.rb,
lib/mutant/mutator/node/named_value/constant_assignment.rb,
lib/mutant/mutator/node/named_value/variable_assignment.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Generator for mutations
Defined Under Namespace
Constant Summary collapse
- REGISTRY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Registry.new
Instance Attribute Summary collapse
-
#output ⇒ Set<Parser::AST::Node>
readonly
private
Return output.
Class Method Summary collapse
-
.mutate(node, parent = nil) ⇒ Set<Parser::AST::Node>
private
Lookup and invoke dedicated AST mutator.
Instance Attribute Details
#output ⇒ Set<Parser::AST::Node> (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 output
32 33 34 |
# File 'lib/mutant/mutator.rb', line 32 def output @output end |
Class Method Details
.mutate(node, parent = nil) ⇒ Set<Parser::AST::Node>
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.
Lookup and invoke dedicated AST mutator
15 16 17 |
# File 'lib/mutant/mutator.rb', line 15 def self.mutate(node, parent = nil) self::REGISTRY.lookup(node.type).call(node, parent) end |