Modified Command.argument to let the user provide a method call for runtime learning of options value. This will let the compiler check at compile time
This commit is contained in:
Binary file not shown.
@@ -35,7 +35,11 @@ module CliGen
|
||||
{% end %}
|
||||
{% if options %}
|
||||
{% options = options.resolve if options.is_a? Path %}
|
||||
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided options must be an ArrayLiteral" unless options.is_a? ArrayLiteral %}
|
||||
{% if options.is_a? Call %}
|
||||
{% elsif options.is_a? ArrayLiteral %}
|
||||
{% else %}
|
||||
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided options must be an ArrayLiteral or a runtime method call to retrieve data" %}
|
||||
{% end %}
|
||||
{% end %}
|
||||
{% if format %}
|
||||
{% format = format.resolve if format.is_a? Path %}
|
||||
|
||||
Reference in New Issue
Block a user