Module: Clin

Defined in:
lib/clin.rb,
lib/clin/errors.rb,
lib/clin/version.rb

Overview

Clin version

Defined Under Namespace

Classes: Argument, Command, CommandDispatcher, CommandOptionsMixin, CommandParser, FixedArgumentError, GeneralOption, HelpOptions, MissingArgumentError, Option, OptionList

Constant Summary collapse

Error =

Parent error class for all Clin errors

Class.new(RuntimeError)
CommandLineError =

Error cause by the user input(when parsing command)

Class.new(Error)
HelpError =

Error when the help needs to be shown

Class.new(CommandLineError)
ArgumentError =

Error when an positional argument is wrong

Class.new(CommandLineError)
OptionError =

Error when a option is wrong

Class.new(CommandLineError)
VERSION =
'0.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.exe_nameObject

Global exe_name If this is not override it will be 'command'


18
19
20
# File 'lib/clin.rb', line 18

def exe_name
  @exe_name ||= Clin.default_exe_name
end

Class Method Details

.default_exe_nameObject


12
13
14
# File 'lib/clin.rb', line 12

def default_exe_name
  'command'
end