Class: Mutant::Mutator::Node

Inherits:
Mutant::Mutator show all
Includes:
AbstractType, NodeHelpers, Unparser::Constants
Defined in:
lib/mutant/mutator/node.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/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/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/node/binary.rb,
lib/mutant/mutator/node/define.rb,
lib/mutant/mutator/node/nthref.rb,
lib/mutant/mutator/node/return.rb,
lib/mutant/mutator/node/zsuper.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/resbody.rb,
lib/mutant/mutator/node/restarg.rb,
lib/mutant/mutator/node/argument.rb,
lib/mutant/mutator/node/blockarg.rb,
lib/mutant/mutator/node/arguments.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/loop_control.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/literal/dynamic.rb,
lib/mutant/mutator/node/conditional_loop.rb,
lib/mutant/mutator/node/named_value/access.rb,
lib/mutant/mutator/node/named_value/constant_assignment.rb,
lib/mutant/mutator/node/named_value/variable_assignment.rb

Overview

Abstract base class for node mutators

Defined Under Namespace

Modules: NamedValue Classes: Argument, Arguments, Begin, Binary, Block, Blockarg, Case, ConditionalLoop, Const, Define, Dstr, Dsym, Generic, If, Kwbegin, Literal, LoopControl, MLHS, MultipleAssignment, Noop, NthRef, OpAsgn, Resbody, Restarg, Return, Send, Splat, Super, When, Yield, ZSuper

Constant Summary

Constants included from NodeHelpers

NodeHelpers::INFINITY, NodeHelpers::NAN, NodeHelpers::NEGATIVE_INFINITY, NodeHelpers::NEW_OBJECT, NodeHelpers::N_EMPTY, NodeHelpers::N_FALSE, NodeHelpers::N_NIL, NodeHelpers::N_TRUE, NodeHelpers::RAISE

Instance Attribute Summary

Attributes inherited from Mutant::Mutator

#input, #parent

Class Method Summary collapse

Methods included from NodeHelpers

#n_not, s

Methods inherited from Mutant::Mutator

each

Class Method Details

.identity(node) ⇒ String

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 identity of node

Parameters:

  • node (Parser::AST::Node)

Returns:

  • (String)


20
21
22
# File 'lib/mutant/mutator/node.rb', line 20

def self.identity(node)
  Unparser.unparse(node)
end