Sha256: 698b3be275c12016fcd6e27021fe02d5bd7f552e88bca4e6cc59360f5922dc9e
Contents?: true
Size: 808 Bytes
Versions: 18
Compression:
Stored size: 808 Bytes
Contents
require "thor/group" module Berkshelf class BaseGenerator < Thor::Group class << self def source_root Berkshelf.root.join("generator_files") end end # A list of cookbook patterns accepted by generators inheriting from # this generator. # # @return [Array<String>] PATTERNS = %w{ environment application library wrapper}.freeze shell = Berkshelf.ui argument :path, type: :string, required: true class_option :pattern, type: :string, default: "application", desc: "Modifies the generated skeleton based on the given pattern.", aliases: "-p", enum: BaseGenerator::PATTERNS include Thor::Actions private def target @target ||= Pathname.new(File.expand_path(path)) end end end
Version data entries
18 entries across 18 versions & 1 rubygems