Class: Rodolfo::Generator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Rodolfo::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/rodolfo/cli.rb
Overview
Rodolfo recipe generator
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
15 16 17 |
# File 'lib/rodolfo/cli.rb', line 15 def self.source_root File.join __dir__, 'templates' end |
Instance Method Details
#five ⇒ Object
36 37 38 39 40 41 |
# File 'lib/rodolfo/cli.rb', line 36 def five puts puts 'Recipe ready! Try it with:' puts "cat #{folder}/data.json | rodolfo render #{folder}" \ " --save-to #{folder}.pdf" end |
#four ⇒ Object
32 33 34 |
# File 'lib/rodolfo/cli.rb', line 32 def four copy_file('data.tt', "#{folder}/data.json") end |
#one ⇒ Object
19 20 21 22 |
# File 'lib/rodolfo/cli.rb', line 19 def one puts Generator.source_root empty_directory(folder) end |
#three ⇒ Object
28 29 30 |
# File 'lib/rodolfo/cli.rb', line 28 def three template('template.tt', "#{folder}/template.rb") end |
#two ⇒ Object
24 25 26 |
# File 'lib/rodolfo/cli.rb', line 24 def two template('schema.tt', "#{folder}/schema.json") end |