abstract class Optarg::Parser

Defined in:

lib/parser.cr

Class Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.after_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.after_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.after_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.around_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.around_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.around_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.before_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.before_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.before_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.on_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.on_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def self.on_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a callback for the validate group.

This method is automatically defined by the Crystal Callback library.


Instance Method Detail

def after_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def after_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def after_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def around_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def around_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def around_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def before_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def before_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def before_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def callback_results : Hash(String, Callback::ResultSet(Nil)) #

Returns callback results.

This method is automatically defined by the Crystal Callback library.


def callback_results_for_validate #

Returns callback results of the validate group.

This method is automatically defined by the Crystal Callback library.


def data : Model #

Returns a target model instance.


[View source]
def invalidate!(message : String) #

Creates and raises a new ValidationError with the message.


[View source]
def on_validate(name, proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def on_validate(proc : ::Proc(Optarg::Parser, Model, Nil)) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def on_validate(name = nil, &block : Optarg::Parser, Model -> Nil) #

Registers a dynamic callback for the validate group.

This method is automatically defined by the Crystal Callback library.


def run_callbacks_for_validate(*args, &block) #

Invokes all callbacks of the validate group.

This method is automatically defined by the Crystal Callback library.


Macro Detail

macro define_callback_group(name, proc_type = ::Proc(::Nil)) #

Defines a new callback group.

This macro is automatically defined by the Crystal Callback library.


[View source]
macro inherit_callback_group(name, proc_type = ::Proc(::Nil)) #

Inherits an existing callback group that is defined in its ancestor class.

This macro is automatically defined by the Crystal Callback library.


[View source]