Class: VhostWriter::CLI
- Inherits:
-
Thor
- Object
- Thor
- VhostWriter::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/vhost_writer/cli.rb
Instance Method Summary collapse
Instance Method Details
#scaffold(scaffold = '') ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/vhost_writer/cli.rb', line 21 def scaffold(scaffold='') if scaffold.empty? say "Available scaffolds:\n ", :yellow say "#{available_scaffolds.join("\n ")}" else write_scaffold scaffold end end |
#write(sites_dir, conf_dir, template) ⇒ Object
13 14 15 16 |
# File 'lib/vhost_writer/cli.rb', line 13 def write(sites_dir, conf_dir, template) writer = VhostWriter::Writer.new :sites_dir => sites_dir, :conf_dir => conf_dir writer.write_configs! File.read template end |