Class: Chemtrail::Cli
- Inherits:
-
Thor
- Object
- Thor
- Chemtrail::Cli
- Defined in:
- lib/chemtrail/cli.rb
Instance Method Summary collapse
Instance Method Details
#build(template_name) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/chemtrail/cli.rb', line 17 def build(template_name) require_templates_from([:path]) template_class = fetch_template_class_named(template_name) template_json = JSON.pretty_generate(template_class.new.to_hash) Kernel.puts(template_json) end |
#list ⇒ Object
10 11 12 13 |
# File 'lib/chemtrail/cli.rb', line 10 def list require_templates_from([:path]) Chemtrail::Template.subclass_map.keys.each { |k| Kernel.puts(k) } end |