| Argument |
= |
Struct.new(:name, :bare, :usage, :type, :description) |
| Option |
= |
Struct.new(:name, :short, :long, :negated, :necessity, :type, :declaration, :description) do def process!(argument) |
| Env |
= |
Struct.new(:name, :variable) |
| Result |
= |
Struct.new(:command, :options, :arguments) |
| Types |
= |
{ :Virtual => nil, :Boolean => proc { |v| v =~ /\A(?:true|y(?:es)?)\z/i }, :String => proc { |v| v }, :Integer => proc { |v| Integer(v) }, :Octal => proc { |v| Intever("0#{v}") }, :Hex => proc { |v| Integer("0x#{v}") }, :Float => proc { |v| Float(v) }, :File => proc { |v| raise FileNotFoundError, "No such file or directory - #{v}" unless File.exist?(v) |