Separate parsing and processing of options.
Rename Options::Parser to Options::HelpfulParser - this is the class that works like Ruby built-in OptionParser, but with improved --help system. Use Options::Parser as a name for the class that constructs the OptionParser object and performs parsing with it, returning Options::Record object. While doing so, it tries to do little more than setting of attributes on Options::Record - it handles converting filenames to canonical form; reading file contents for --head-html, --body-html and --css; reading and interpreting the --config JSON file (and also auto-detection of the latter). Options::Processor takes care of the rest: expanding filenames, rendering the footer, configuring various classes, and validating the options.
Loading
Please register or sign in to comment