Sha256: 9f82577ab485dbe84931dbb8fc68d094b658c5295e50ae2d2666f22db716ed58
Contents?: true
Size: 785 Bytes
Versions: 1
Compression:
Stored size: 785 Bytes
Contents
class Lono::CLI::New class Blueprint < Sequence argument :name def self.cli_options [ [:examples, type: :boolean, desc: "Whether not to generate examples"], [:force, type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"], [:project, desc: "Project name"], ] end cli_options.each do |args| class_option(*args) end def set_source if @options[:examples] set_template_source "examples/blueprint" else set_template_source "blueprint" end end def create_blueprint logger.info "=> Creating new blueprint called #{name}." dest = [@options[:project], "app/blueprints"].compact.join('/') directory ".", "#{dest}/#{name}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lono-8.0.0.pre.rc3 | lib/lono/cli/new/blueprint.rb |