Class: Wlog::BootstrapTemplates

Inherits:
Commandable show all
Includes:
StaticConfigurations
Defined in:
lib/wlog/commands/bootstrap_templates.rb

Overview

Author:

  • Simon Symeonidis

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

Constructor Details

#initializeBootstrapTemplates

Returns a new instance of BootstrapTemplates.



10
11
# File 'lib/wlog/commands/bootstrap_templates.rb', line 10

def initialize
end

Instance Method Details

#executeObject



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