Class: Settings::InitialFilesCreator
- Inherits:
-
Object
- Object
- Settings::InitialFilesCreator
- Defined in:
- lib/gorgon/settings/initial_files_creator.rb
Constant Summary collapse
- GORGON_JSON_FILE =
'gorgon.json'
Class Method Summary collapse
- .create_files(content) ⇒ Object
-
.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’.
Class Method Details
.create_files(content) ⇒ Object
20 21 22 |
# File 'lib/gorgon/settings/initial_files_creator.rb', line 20 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’
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/gorgon/settings/initial_files_creator.rb', line 9 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 |