Class: Wlog::BootstrapTemplates
- Inherits:
-
Commandable
- Object
- Commandable
- Wlog::BootstrapTemplates
- Includes:
- StaticConfigurations
- Defined in:
- lib/wlog/commands/bootstrap_templates.rb
Overview
Constant Summary
Constants included from StaticConfigurations
StaticConfigurations::AppDirectory, StaticConfigurations::AppName, StaticConfigurations::ConfigDirectory, StaticConfigurations::ConfigFile, StaticConfigurations::DataDirectory, StaticConfigurations::DefaultDb, StaticConfigurations::TaintFile, StaticConfigurations::TemplateDir, StaticConfigurations::TemplateOutputDir, StaticConfigurations::TemplateSampleFile
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ BootstrapTemplates
constructor
A new instance of BootstrapTemplates.
Constructor Details
#initialize ⇒ BootstrapTemplates
Returns a new instance of BootstrapTemplates.
10 11 |
# File 'lib/wlog/commands/bootstrap_templates.rb', line 10 def initialize end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/wlog/commands/bootstrap_templates.rb', line 13 def execute unless File.exists? TemplateDir FileUtils.mkdir_p TemplateDir end unless File.exists? TemplateSampleFile write_default_template! end end |