Use child nameing in return mutator
This commit is contained in:
parent
c62b1fc9df
commit
10c611f5e3
1 changed files with 2 additions and 3 deletions
|
@ -6,7 +6,7 @@ module Mutant
|
||||||
|
|
||||||
handle(:return)
|
handle(:return)
|
||||||
|
|
||||||
VALUE_INDEX = 0
|
children :value
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
@ -17,10 +17,9 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def dispatch
|
def dispatch
|
||||||
value = children.first
|
|
||||||
if value
|
if value
|
||||||
emit(value)
|
emit(value)
|
||||||
mutate_child(VALUE_INDEX)
|
emit_value_mutations
|
||||||
else
|
else
|
||||||
emit_nil
|
emit_nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue