Markdent::Role::Event - Implements behavior shared by all events


Markdent documentation  | view source Contained in the Markdent distribution.

Index


NAME

Top

Markdent::Role::Event - Implements behavior shared by all events

VERSION

Top

version 0.17

DESCRIPTION

Top

This role provides shared behavior for all event classes. It is actually somewhat of a hack, as it is a parameterized role that generates methods for each class that consumes it.

METHODS

Top

This role provides the following methods:

$event->is_start()

$event->is_end()

$event->is_inline()

These all returns booleans indicating whether the event is of the specified type.

$event->event_name()

This returns a name like "start_blockquote", "end_strong", or "text".

$event->kv_pairs_for_attributes()

This returns a hash representing the data stored in the object's attributes. If an attribute is not required and has not been set, it will not be present in the hash.

$event->debug_dump()

Returns a string representation of the event suitable for debugging output.

BUGS

Top

See Markdent for bug reporting details.

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


Markdent documentation  | view source Contained in the Markdent distribution.