lib/ecf_classify.rb in ecf_classify-1.0.0 vs lib/ecf_classify.rb in ecf_classify-1.0.1
- old
+ new
@@ -4,11 +4,18 @@
require "tempfile"
require 'thor'
module EcfClassify
class CLI < Thor
- package_name "ecf_classify"
+ package_name "#{EcfClassify::NAME}"
class_option :help, aliases: "-h", type: :boolean
+ map %w[--version] => :__print_version
+
+ desc "--version", "print the version"
+ def __print_version
+ puts "#{EcfClassify::NAME}: #{EcfClassify::VERSION}"
+ exit
+ end
desc "groups [FILE]", "Classifies protein sequences into ECF groups"
method_option :probabilities, type: :string, aliases: "-p", default: nil
def groups(file)
handle_help_option(__method__)