module Barman class ProjectGenerator PROJECT_GENERATORS = { "qa" => ProjectGenerators::QA, } def initialize(project_type, project_name, options) @project_type = project_type @project_name = project_name @options = options end def generate! project_generator = PROJECT_GENERATORS[project_type] if project_generator.nil? return raise NotImplementedError, "Project generator #{project_type} not implemented" end project_generator.new(project_name, options).generate! end private attr_reader :project_type, :project_name, :options end end