Sha256: 8e2bae594c1e30ed01576c1d86011f72d24f529e42d6dbf5005adcad95b0b82b

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

module KStarter
  module Commands
    # Submenu for new
    class BootstrapProject < KStarter::Commands::Command
      def initialize(**options)
        @options = options
        super()
      end

      def execute(input: $stdin, output: $stdout)
        display_exiting_projects
        project = select_project

        # Is the if project even relevant at the moment?
        bootstrap_project(project) if project
      end

      def bootstrap_project(project)
        puts JSON.pretty_generate(project.to_h)

        starter = KStarter::Map.starter(project)
        starter.execute
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
k_starter-0.1.4 lib/k_starter/commands/project/bootstrap_project.rb
k_starter-0.1.3 lib/k_starter/commands/project/bootstrap_project.rb
k_starter-0.1.2 lib/k_starter/commands/project/bootstrap_project.rb
k_starter-0.1.1 lib/k_starter/commands/project/bootstrap_project.rb