module Jargon

Defined in:

jargon.cr
jargon/cli.cr
jargon/completion.cr
jargon/config.cr
jargon/help.cr
jargon/result.cr
jargon/schema.cr
jargon/schema/property.cr

Constant Summary

VERSION = "0.9.1"

Constructors

Class Method Summary

Constructor Detail

def self.new(program_name : String) : CLI #

Convenience method to create a CLI with just a program name (for subcommand mode)


[View source]

Class Method Detail

def self.cli(program_name : String, *, json : String) : CLI #

Convenience shortcut with program name first


[View source]
def self.cli(program_name : String, *, file : String) : CLI #

[View source]
def self.cli(program_name : String, *, yaml : String) : CLI #

[View source]
def self.config_warnings=(config_warnings : Bool) #

Control whether config parse warnings are emitted to STDERR


[View source]
def self.config_warnings? : Bool #

Control whether config parse warnings are emitted to STDERR


[View source]
def self.from_file(path : String, program_name : String = "cli") : CLI #

DEPRECATED Use Jargon.cli(program_name, file: path) instead


[View source]
def self.from_json(json : String, program_name : String = "cli") : CLI #

DEPRECATED Use Jargon.cli(program_name, json: schema) instead


[View source]
def self.merge(sub : String, global : String) : String #

Merge global schema properties into a subcommand schema. Properties from global are added to sub (sub takes precedence if both define same key).


[View source]