Class: HecksDomain::CLI::New

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/cli/new.rb

Overview

Generate a new domain project

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



13
14
15
# File 'lib/cli/new.rb', line 13

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_hexagon_folderObject



25
26
27
28
# File 'lib/cli/new.rb', line 25

def create_hexagon_folder
  return unless options[:nobuilder]
  directory('templates/domain', ".")
end

#load_from_builderObject



17
18
19
20
21
22
23
# File 'lib/cli/new.rb', line 17

def load_from_builder
  return if options[:nobuilder]
  CommandBuilder.new(
    name:    File.basename(Dir.getwd),
    dry_run: !options[:dry_run].nil?
  ).call
end