Class: Wlog::TemplateHelper
- Inherits:
-
Object
- Object
- Wlog::TemplateHelper
- Includes:
- StaticConfigurations
- Defined in:
- lib/wlog/domain/template_helper.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
Class Method Summary collapse
-
.template_file ⇒ Object
Absolute path to the template the user has set.
-
.template_s ⇒ Object
Template contents of the current selected template.
Class Method Details
.template_file ⇒ Object
Returns absolute path to the template the user has set.
10 11 12 13 |
# File 'lib/wlog/domain/template_helper.rb', line 10 def self.template_file num = KeyValue.get('template') || 1 Dir[TemplateDir + '*'][num.to_i - 1] end |
.template_s ⇒ Object
Returns template contents of the current selected template.
16 17 18 |
# File 'lib/wlog/domain/template_helper.rb', line 16 def self.template_s File.read(TemplateHelper.template_file) end |