# frozen_string_literal: true require 'thor' <%- constantinized_parts.each_with_index do |const, i| -%> <%= ' ' * i %>module <%= const %> <%- end -%> <%= indent %># Handle the application command line parsing <%= indent %># and the dispatch to various command objects <%= indent %># <%= indent %># @api public <%= indent %>class CLI < Thor <%= indent %> # Error raised by this runner <%= indent %> Error = Class.new(StandardError) <%= indent %> desc 'version', '<%= app_name %> version' <%= indent %> def version <%= indent %> require_relative 'version' <%= indent %> puts "v#{<%= constantinized_name %>::VERSION}" <%= indent %> end <%= indent %> map %w(--version -v) => :version <%- (constantinized_parts.size).downto(0) do |i| -%> <%= ' ' * i %>end <%- end -%>