Sha256: 5b0f5d05809f2a3e68e02e1cec2262c3ae899977730ef739befa26e77ab6fb2c
Contents?: true
Size: 614 Bytes
Versions: 5
Compression:
Stored size: 614 Bytes
Contents
require 'thor/group' module Kanpachi module Commands class New < Thor::Group include Thor::Actions desc 'Generate a new API' argument :name, type: :string, desc: "The name of the API to generate" class_option :test_framework, default: :minitest def self.source_root File.expand_path(File.join('..', '..', '..', 'templates'), File.dirname(__FILE__)) end def create_app directory ".", "#{name}" end protected def name_const @name_const ||= Inflecto.camelize(name.gsub(/\W/, '_').squeeze('_')) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems