class Brick::CLI_Validator

Constants

NO_COMMAND_GIVEN

Public Class Methods

no_command_given?() click to toggle source
# File lib/brick/cli__validator.rb, line 16
def self.no_command_given?
  ARGV.empty?
end
no_subcommand_given?() click to toggle source
# File lib/brick/cli__validator.rb, line 12
def self.no_subcommand_given?
  ARGV[0] =~ /^-/
end
print_help_and_exit(exitcode=1, fatal_message=nil) click to toggle source
validate() click to toggle source
# File lib/brick/cli__validator.rb, line 5
def self.validate
  if  no_command_given?
    print_help_and_exit(1, NO_COMMAND_GIVEN)
  end
  
end