NAME

Dancer2::RPCPlugin::DispatchItem - Small object to handle dispatch-table items

SYNOPSIS

    use Dancer2::RPCPlugin::DispatchItem;
    use Dancer2::Plugin::RPC::JSON;
    jsonrpc '/json' => {
        publish => sub {
            return {
                'system.ping' => Dancer2::RPCPlugin::DispatchItem->new(
                    code    => MyProject::Module1->can('sub1'),
                    package => 'Myproject::Module1',
                ),
            };
        },
    };

DESCRIPTION

Dancer2::RPCPlugin::DispatchItem->new(%arguments)

Parameters

Named:

code => $code_ref [Required]
package => $package [Optional]

$di->code

Getter for the code attibute.

$di->package

Getter for the package attribute

COPYRIGHT

(c) MMXVI - Abe Timmerman <abetim@cpan.org>