Skip to content

struct Athena::Routing::Listeners::View
inherits Struct #

The view listener attempts to resolve a non ART::Response into an ART::Response. Currently this is achieved by JSON serializing the controller action's resulting value; either via Object#to_json or ASR::Serializer, depending on what type the resulting value is.

In the future this listener will handle executing the correct view handler based on the registered formats and the format that the initial HTTP::Request requires.

TODO: Implement a format negotiation algorithm.

Included modules


Class methods#

.subscribed_events : AED::SubscribedEvents #

View source


#call(event : ART::Events::View, dispatcher : AED::EventDispatcherInterface) : Nil #

View source