Class: Gorgon::Settings::InitialFilesCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/gorgon/settings/initial_files_creator.rb

Constant Summary collapse

GORGON_JSON_FILE =
'gorgon.json'

Class Method Summary collapse

Class Method Details

.create_files(content) ⇒ Object



21
22
23
# File 'lib/gorgon/settings/initial_files_creator.rb', line 21

def self.create_files content
  self.create_gorgon_json content
end

.run(framework) ⇒ Object

TODO: we may change this, so it knows what Creator to use according to the Gemfile, so the user doesn’t need to specify ‘framework’



10
11
12
13
14
15
16
17
18
19
# File 'lib/gorgon/settings/initial_files_creator.rb', line 10

def self.run framework
  if framework.nil?
    create_files SimpleProjectFilesContent.new
  elsif framework == 'rails'
    create_files RailsProjectFilesContent.new
  else
    $stderr.puts "Unknown framework"
    exit(1)
  end
end