free_mutant/lib/mutant/cli/builder.rb

44 lines
745 B
Ruby
Raw Normal View History

module Mutant
class CLI
# Abstract base class for strategy builders
class Builder
# Rspec strategy builder
class Rspec
# Initialize object
#
# @return [undefined]
#
# @api private
#
def initialize
@level = 0
end
# Set rspec level
#
# @return [self]
#
# @api private
#
def set_level(level)
@level = level
self
end
# Return strategy
#
# @return [Strategy::Rspec]
#
# @api private
#
def strategy
Strategy::Rspec.new(@level)
end
end # Rspec
end # Builder
end # CLI
end # Mutant