Created
June 28, 2016 21:10
-
-
Save maxpowa/512cd4d995817ec50931f52f1e2d9e0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "option_parser" | |
module Blerp | |
abstract class CommandFlag | |
@@flags = { } of Symbol => CommandFlag | |
def self.flags | |
@@flags | |
end | |
def initialize | |
# Add to the flags array once initialized | |
@@flags[self.name] = self | |
end | |
getter name : Symbol | |
getter key : String | |
getter description : String | |
def processor (parser, data) | |
# optional implementation | |
end | |
def preprocessor (parser, data) | |
# optional implementation | |
end | |
def postprocessor (parser, data) | |
# optional implementation | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment