2012-12-06 15:30:28 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
class Define < self
|
|
|
|
|
|
|
|
handle(Rubinius::AST::Define)
|
|
|
|
handle(Rubinius::AST::DefineSingletonScope)
|
|
|
|
|
2012-12-10 11:26:56 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
emit_attribute_mutations(:body)
|
|
|
|
emit_attribute_mutations(:arguments)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DefineSingleton < self
|
|
|
|
|
|
|
|
handle(Rubinius::AST::DefineSingleton)
|
|
|
|
|
2012-12-06 15:30:28 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
2012-12-06 16:30:57 -05:00
|
|
|
emit_attribute_mutations(:body)
|
2012-12-06 15:30:28 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|