class Project

Overview

The Project class represents a project that can handle different types of events. It uses an EventRegistry to create event handlers based on the event type.

Defined in:

runway/models/project.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(log : Log, config : ProjectConfig) #

Initializes a new Project.

@param log [Log] The logger to use. @param config [ProjectConfig] The configuration for the project.


[View source]

Instance Method Detail

def check_for_event(event : Event) #

Checks for an event and handles it if the event type is registered. If the event was triggered (any return value other than nil), the project's deployment configuration is run.

@param event [Event] The event to check for.


[View source]
def events : Hash(String, BaseEvent) #

Provides read access to the #events instance variable. @return [Hash(String, BaseEvent)] A hash mapping event types to event handlers.


[View source]
def name : String #

Provides read access to the name of the project. @return [String] The name of the project.


[View source]