Module: Clin
- Defined in:
- lib/clin.rb,
lib/clin/errors.rb,
lib/clin/version.rb
Overview
Clin version
Defined Under Namespace
Modules: CommandMixin, LineReader Classes: Argument, Command, CommandDispatcher, CommandLineError, CommandParser, GeneralOption, HelpError, HelpOptions, MissingArgumentError, MissingOptionArgumentError, Option, OptionError, OptionList, OptionParser, OptionUnexpectedArgumentError, RequiredArgumentError, Shell, ShellInteraction, Text, UnknownOptionError
Constant Summary collapse
- Error =
Parent error class for all Clin errors
Class.new(RuntimeError)
- ArgumentError =
Error when an positional argument is wrong
Class.new(CommandLineError)
- VERSION =
'0.4.0'
Class Attribute Summary collapse
- .diff_cmd ⇒ Object
-
.exe_name ⇒ Object
Global exe_name If this is not override it will be ‘command’.
-
.use_readline ⇒ Object
writeonly
If the line reader should use Readline(For autocomplete and history).
Class Method Summary collapse
Class Attribute Details
.diff_cmd ⇒ Object
28 29 30 |
# File 'lib/clin.rb', line 28 def diff_cmd @diff_cmd ||= 'diff -u' end |
.exe_name ⇒ Object
Global exe_name If this is not override it will be ‘command’
24 25 26 |
# File 'lib/clin.rb', line 24 def exe_name @exe_name ||= Clin.default_exe_name end |
.use_readline=(value) ⇒ Object (writeonly)
If the line reader should use Readline(For autocomplete and history)
16 17 18 |
# File 'lib/clin.rb', line 16 def use_readline=(value) @use_readline = value end |
Class Method Details
.default_exe_name ⇒ Object
18 19 20 |
# File 'lib/clin.rb', line 18 def default_exe_name 'command' end |
.use_readline? ⇒ Boolean
32 33 34 |
# File 'lib/clin.rb', line 32 def use_readline? @use_readline ||= !ENV['CLIN_NO_READLINE'] end |