class Crispr::Mutations::Boolean

def mutations_for(node)

Returns:
  • (Array) - mutated Ruby source code strings

Parameters:
  • node (Parser::AST::Node) -- the AST node to inspect
def mutations_for(node)
  return [] unless node.is_a?(Parser::AST::Node)
  case node.type
  when :true
    [Unparser.unparse(Parser::AST::Node.new(:false))]
  when :false
    [Unparser.unparse(Parser::AST::Node.new(:true))]
  else
    []
  end
end