Class: Foobara::Generators::EmptyRubyProjectGenerator::GenerateEmptyRubyProject

Inherits:
Generate
  • Object
show all
Defined in:
foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb

Defined Under Namespace

Classes: MissingManifestError

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from Generate

#element_to_generate

Attributes included from CommandPatternImplementation::Concerns::Subcommands

#is_subcommand

Attributes included from CommandPatternImplementation::Concerns::Runtime

#exception, #outcome

Attributes included from CommandPatternImplementation::Concerns::Errors

#error_collection

Attributes included from CommandPatternImplementation::Concerns::Inputs

#inputs, #raw_inputs

Instance Method Summary collapse

Methods inherited from Generate

#each_element_to_generate, #elements_to_generate, #generate_element, #generated, #generated_elements, #include_non_templated_files, #paths_to_source_code

Methods inherited from Command

install!, reset_all

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Methods included from CommandPatternImplementation::Concerns::Reflection

#initialize

Methods included from CommandPatternImplementation::Concerns::DomainMappers

#domain_map, #domain_map!, #run_mapped_subcommand!

Methods included from CommandPatternImplementation::Concerns::Subcommands

#run_subcommand!, #subcommand?

Methods included from CommandPatternImplementation::Concerns::Entities

#load_entities, #load_records

Methods included from CommandPatternImplementation::Concerns::Transactions

#auto_detect_current_transactions, #commit_transaction, #open_transaction, #opened_transactions, #relevant_entity_classes, #rollback_transaction, #transactions

Methods included from CommandPatternImplementation::Concerns::StateMachine

#state_machine

Methods included from CommandPatternImplementation::Concerns::Runtime

#halt!, #run, #run!, #run_execute, #succeed, #success?, #validate, #validate_records

Methods included from CommandPatternImplementation::Concerns::Errors

#initialize

Methods included from CommandPatternImplementation::Concerns::Inputs

#cast_and_validate_inputs, #initialize, #method_missing, #respond_to_missing?, #respond_to_missing_for_inputs?

Methods included from TruncatedInspect

#inspect, truncating

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::CommandPatternImplementation::Concerns::Inputs

Instance Method Details

#add_initial_elements_to_generateObject



33
34
35
# File 'foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb', line 33

def add_initial_elements_to_generate
  elements_to_generate << project_config
end

#base_generatorObject



25
26
27
# File 'foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb', line 25

def base_generator
  Generators::ProjectGenerator
end

#executeObject



13
14
15
16
17
18
19
20
21
22
23
# File 'foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb', line 13

def execute
  include_non_templated_files

  add_initial_elements_to_generate

  each_element_to_generate do
    generate_element
  end

  paths_to_source_code
end

#project_configObject



37
38
39
# File 'foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb', line 37

def project_config
  @project_config ||= ProjectConfig.new(inputs)
end

#templates_dirObject



29
30
31
# File 'foobara-empty-ruby-project-generator-0.0.18/src/generate_empty_ruby_project.rb', line 29

def templates_dir
  "#{__dir__}/../templates"
end