Module: RailsFormation

Defined in:
lib/rails_formation.rb,
lib/rails-formation/version.rb,
lib/rails-formation/cli/processor.rb,
lib/rails-formation/cli/api_adapter.rb,
lib/rails-formation/cli/file_adapter.rb

Defined Under Namespace

Modules: Cli

Constant Summary collapse

RailsNotInstalled =
Class.new(StandardError)
VERSION =
'0.0.0.7'
RAILS_VERSION =
'7.0.2.3'

Class Method Summary collapse

Class Method Details

.apply(template) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/rails_formation.rb', line 13

def apply(template)
  verify_rails_installation
  generate_project(template)
  generate_files(template.fetch('files', []))

  template.fetch('commands', []).each do |project_command|
    system(project_command)
  end
end