Improve documentation of literal mutators

This commit is contained in:
Markus Schirp 2012-12-06 19:23:21 +01:00
parent 48892556fa
commit cf2d685dfc
9 changed files with 33 additions and 9 deletions

View file

@ -27,7 +27,7 @@ module Mutant
new(self.class::INVERSE_CLASS)
end
# Represent mutations of true literal
# Mutator for true literals
class TrueLiteral < self
INVERSE_CLASS = Rubinius::AST::FalseLiteral
@ -35,7 +35,7 @@ module Mutant
end
# Represent mutations of false literal
# Mutator for false literals
class FalseLiteral < self
INVERSE_CLASS = Rubinius::AST::TrueLiteral

View file

@ -3,6 +3,7 @@ module Mutant
class Literal
# Abstract mutations on dynamic literals
class Dynamic < self
include AbstractType
private

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal < self
# Represent mutations on fixnum literal
# Mutator for fixnum literals
class Fixnum < self
handle(Rubinius::AST::FixnumLiteral)

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal < self
# Represent mutations on fixnum literal
# Mutator for float literals
class Float < self
handle(Rubinius::AST::FloatLiteral)

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal
# Mutator for hash literal AST nodes
# Mutator for hash literals
class Hash < self
handle(Rubinius::AST::HashLiteral)

View file

@ -0,0 +1,23 @@
module Mutant
class Mutator
class Literal
# Mutator for nil literals
class Nil < self
handle(Rubinius::AST::NilLiteral)
private
# Emit mutants
#
# @return [undefined]
#
# @api private
#
def dispatch
emit('Object.new'.to_ast)
end
end
end
end
end

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal < self
# Mutator for regexp literal AST nodes
# Mutator for regexp literals
class Regex < self
handle(Rubinius::AST::RegexLiteral)

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal
# Represent mutations on string literal
# Mutator for string literals
class String < self
handle(Rubinius::AST::StringLiteral)

View file

@ -1,7 +1,7 @@
module Mutant
class Mutator
class Literal < self
# Represent mutations on symbol literal
# Mutator for symbol literals
class Symbol < self
handle(Rubinius::AST::SymbolLiteral)