2014-06-02 08:57:14 -04:00
|
|
|
Mutant::Meta::Example.add do
|
|
|
|
source <<-RUBY
|
|
|
|
case
|
|
|
|
when true
|
|
|
|
else
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
2014-06-05 12:37:31 -04:00
|
|
|
singleton_mutations
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
mutation <<-RUBY
|
|
|
|
case
|
|
|
|
when true
|
|
|
|
raise
|
|
|
|
else
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
mutation <<-RUBY
|
|
|
|
case
|
|
|
|
when false
|
|
|
|
else
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
mutation <<-RUBY
|
|
|
|
case
|
|
|
|
when nil
|
|
|
|
else
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
end
|
|
|
|
|
|
|
|
Mutant::Meta::Example.add do
|
|
|
|
source <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
2014-06-05 12:37:31 -04:00
|
|
|
singleton_mutations
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
mutation <<-RUBY
|
|
|
|
case nil
|
2014-06-05 12:37:31 -04:00
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case self
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
2014-06-02 08:57:14 -04:00
|
|
|
raise
|
2014-06-05 12:37:31 -04:00
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
2014-06-02 08:57:14 -04:00
|
|
|
when nil
|
2014-06-05 12:37:31 -04:00
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when self
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
nil
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
self
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation <<-RUBY
|
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when nil, C
|
|
|
|
C
|
|
|
|
else
|
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when self, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, nil
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, self
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
D
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
|
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
else
|
2014-06-05 12:37:31 -04:00
|
|
|
self
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation <<-RUBY
|
2014-06-05 12:37:31 -04:00
|
|
|
case condition
|
|
|
|
when A
|
|
|
|
when B, C
|
|
|
|
C
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
RUBY
|
|
|
|
end
|