class Thyme::Option
- Thyme::Option
- Reference
- Object
Overview
Wraps the option extension in THYMERC_FILE configuration. Used by end users to extend Thyme with their own options and commands.
Defined in:
thyme/option.crConstructors
Class Method Summary
-
.parse(name, yaml)
Parses YAML and returns a Thyme::Option.
-
.validate!(yaml, name, key)
Verifies key is available and is a String.
Instance Method Summary
-
#call(option_args : NamedTuple)
Calls
#command
as a system command. - #description : String
- #flag : String
- #flag_long : String
- #name : String
Constructor Detail
def self.new(name : String, flag : String, flag_long : String, description : String, command : String)
#
Class Method Detail
Instance Method Detail
def call(option_args : NamedTuple)
#
Calls #command
as a system command. Replaces placeholders with actual values:
#{flag}
- value given to a flag
#{args}
- additional arguments given to the thyme
command