Module: Clin

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

Overview

Clin version

Defined Under Namespace

Modules: CommandMixin Classes: Argument, Command, CommandDispatcher, CommandParser, FixedArgumentError, GeneralOption, HelpOptions, MissingArgumentError, Option, OptionList, Shell, ShellInteraction

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.3.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.diff_cmdObject



26
27
28
# File 'lib/clin.rb', line 26

def diff_cmd
  @diff_cmd ||= 'diff -u'
end

.exe_nameObject

Global exe_name If this is not override it will be ‘command’



22
23
24
# File 'lib/clin.rb', line 22

def exe_name
  @exe_name ||= Clin.default_exe_name
end

Class Method Details

.default_exe_nameObject



16
17
18
# File 'lib/clin.rb', line 16

def default_exe_name
  'command'
end