Class: Bhook::ThemeGenerator
- Inherits:
-
Object
- Object
- Bhook::ThemeGenerator
- Extended by:
- T::Sig
- Defined in:
- lib/bhook/theme_generator.rb
Instance Method Summary collapse
- #generate! ⇒ Object
-
#initialize(output_path) ⇒ ThemeGenerator
constructor
A new instance of ThemeGenerator.
Constructor Details
permalink #initialize(output_path) ⇒ ThemeGenerator
Returns a new instance of ThemeGenerator.
9 10 11 12 13 |
# File 'lib/bhook/theme_generator.rb', line 9 def initialize(output_path) @output_path = T.let(File.join(output_path, 'theme'), String) @template_files = T.let([Bhook::PAGE_TEMPLATE_PATH, Bhook::AFTER_H1_TEMPLATE_PATH], T::Array[String]) end |
Instance Method Details
permalink #generate! ⇒ Object
[View source]
16 17 18 19 20 21 |
# File 'lib/bhook/theme_generator.rb', line 16 def generate! FileUtils.mkdir_p(@output_path) L.debug("mkdir: #{@output_path}") FileUtils.cp(@template_files, @output_path) L.debug("cp: #{@template_files.join(' ')} #{@output_path}") end |