Sha256: 5e8774eca446e451ca488a209d601de0c76806da450655245b6b698200c7864e

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
barman-0.1.1 lib/barman/project_generator.rb