Module: Captify
- Defined in:
- lib/captify.rb,
lib/captify/cli.rb,
lib/captify/runner.rb,
lib/captify/template.rb,
lib/captify/template_bundle.rb,
lib/captify/template_loader.rb,
lib/captify/template_registrar.rb
Defined Under Namespace
Classes: Cli, Runner, Template, TemplateBundle, TemplateLoader, TemplateRegistrar
Class Method Summary collapse
Class Method Details
.run(argv = ARGV, env = ENV) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/captify.rb', line 9 def self.run(argv=ARGV, env=ENV) opts = Cli.new.parse_argv argv puts `capify #{opts[:target_dir]}` begin Runner.new.run( opts.delete(:template_name) || ENV['CAPTIFY_TEMPLATE'], opts.delete(:target_dir), opts ) rescue ArgumentError => ex puts ex. end end |