abstract class Emeralds::Command

Overview

An abstract class for creating command literals implements a #message and a #block method

Direct Known Subclasses

Defined in:

commands/Command.cr

Constant Summary

DOT_ONLY_NAME = /\A\.+\z/
FORBIDDEN_NAME_CHARS = /[<>:"\\|?*\x00-\x1F]/
WINDOWS_RESERVED_NAMES = /^(con|prn|aux|nul|com[1-9]|lpt[1-9]|com[0-9]+|lpt[0-9]+)$/i

Constructors

Instance Method Summary

Constructor Detail

def self.new(name = "", silent : Bool = false) #

[View source]

Instance Method Detail

abstract def block #

A block of code to be executed for the command

return -> The code block


[View source]
abstract def message #

Contains the informational message for the user while performing an Emerald command

return -> The string to display


[View source]
def run #

[View source]
def separator #

[View source]