Class: Diecut::KindCli
- Inherits:
-
Thor
- Object
- Thor
- Diecut::KindCli
- Includes:
- Thor::Actions
- Defined in:
- lib/diecut/cli.rb
Instance Method Summary collapse
Instance Method Details
#generate(target_dir) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/diecut/cli.rb', line 10 def generate(target_dir) self.destination_root = target_dir mill = Mill.new(self.class.kind) mill.activate_plugins {|name| ["with-#{name}"] } ui = mill.user_interface .delete_if{|_, value| value.nil?} ui.from_hash() mill.churn(ui) do |path, contents| create_file(path, contents) end end |