Sha256: 2daa5ac9c79fda5759732df2ff9039896da7d710c207bd3e61ba339a261cdbb1
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
require 'thor' require_relative '../agile_utils' module AgileUtils class CLI < Thor desc 'main', 'Main entry point' def main opts = options.symbolize_keys if opts[:version] puts "You are using #{AgileUtils::PROJECT_NAME} version #{AgileUtils::VERSION}" exit end execute(opts) end desc 'usage', 'Display help screen' def usage puts <<-EOS # List of available APIs require 'agile_utils' include AgileUtils # Make a call to any of the following AgileUtils::Helper.capture AgileUtils::Helper.is_linux? AgileUtils::Helper.is_osx? AgileUtils::Helper.make_list AgileUtils::Helper.shell AgileUtils::Helper.time AgileUtils::Helper.uname AgileUtils::FileUtil.find() AgileUtils::FileUtils.delete() AgileUtils::FileUtils.gunzip() AgileUtils::FileUtils.tar_gzip_files() EOS end default_task :usage private # @param [Hash<Symbol, Object>] options the options argument def execute(options = {}) puts "FYI: execute with options: #{options}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
agile_utils-0.1.1 | lib/agile_utils/cli.rb |
agile_utils-0.1.0 | lib/agile_utils/cli.rb |