Had to fix the selection macro. Was part of the way throught and skipped finishing it
This commit is contained in:
@@ -7,8 +7,9 @@ module CliGen
|
|||||||
{% raise "ERROR : CliGen::Command.selection : You must provide a short or long" unless long || short %}
|
{% raise "ERROR : CliGen::Command.selection : You must provide a short or long" unless long || short %}
|
||||||
{% raise "ERROR : CliGen::Command.selection : You must provide a description" unless description %}
|
{% raise "ERROR : CliGen::Command.selection : You must provide a description" unless description %}
|
||||||
{% raise "ERROR : CliGen::Command.selection : Provided description must be a String" unless description.is_a? StringLiteral %}
|
{% raise "ERROR : CliGen::Command.selection : Provided description must be a String" unless description.is_a? StringLiteral %}
|
||||||
{% raise "ERROR : CliGen::Command.selection : You must provide options" unless options.is_a? ArrayLiteral %}
|
{% options = options.resolve if options.is_a? Path %}
|
||||||
{% raise "ERROR : CliGen::Command.selection : Provided options must be " unless options. %}
|
{% raise "ERROR : CliGen::Command.selection : Provided options must be an ArrayLiteral" unless options.is_a? ArrayLiteral %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : Provided options must be of the same type as the variable" unless options.of == variable.type %}
|
||||||
|
|
||||||
@[CliGen::Argument(short: {{short}}, long: {{long}}, description: {{description}}, validation: {{validation}}, on_match: {{on_match}})]
|
@[CliGen::Argument(short: {{short}}, long: {{long}}, description: {{description}}, validation: {{validation}}, on_match: {{on_match}})]
|
||||||
@{{variable}}
|
@{{variable}}
|
||||||
|
|||||||
Reference in New Issue
Block a user