Class: Burr::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/burr/generator.rb
Class Method Summary collapse
Instance Method Summary collapse
- #caches_dir ⇒ Object
- #copy_config_file ⇒ Object
- #copy_contents ⇒ Object
- #copy_gemfile ⇒ Object
- #copy_stylesheets ⇒ Object
- #outputs_dir ⇒ Object
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/burr/generator.rb', line 6 def self.source_root File.dirname(__FILE__) + '/../../generators' end |
Instance Method Details
#caches_dir ⇒ Object
36 37 38 |
# File 'lib/burr/generator.rb', line 36 def caches_dir empty_directory 'caches/code' end |
#copy_config_file ⇒ Object
14 15 16 |
# File 'lib/burr/generator.rb', line 14 def copy_config_file copy_file 'config.yml' end |
#copy_contents ⇒ Object
18 19 20 |
# File 'lib/burr/generator.rb', line 18 def copy_contents directory 'contents' end |
#copy_gemfile ⇒ Object
10 11 12 |
# File 'lib/burr/generator.rb', line 10 def copy_gemfile copy_file 'Gemfile.txt', 'Gemfile' end |
#copy_stylesheets ⇒ Object
31 32 33 34 |
# File 'lib/burr/generator.rb', line 31 def copy_stylesheets copy_file 'stylesheets/pdf.css', 'outputs/pdf/style.css' copy_file 'stylesheets/site.css', 'outputs/site/style.css' end |
#outputs_dir ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/burr/generator.rb', line 22 def outputs_dir empty_directory 'outputs/pdf' empty_directory 'outputs/site' empty_directory 'outputs/epub' empty_directory 'outputs/mobi' empty_directory 'outputs/site/figures' end |