class Lolcat::Parser

Overview

Command line argument parser for the lolcat program.

This class extends Crystal's OptionParser to handle lolcat-specific command line options and convert them into an Options struct.

Defined in:

lolcat/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Initializes the parser with all supported command line options.

Sets up all the command line options that lolcat supports and their corresponding handlers.


[View source]

Instance Method Detail

def help_message : String #

The formatted help message string


[View source]
def help_message=(help_message : String) #

The formatted help message string


[View source]
def opt : Options #

The options object that will be populated with parsed values


[View source]
def parse(args) #

Parses the provided command line arguments.

Processes the command line arguments and updates the options object with the parsed values.

args: The command line arguments to parse

Returns the updated Options object


[View source]