class Project
- Project
- Reference
- Object
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.crConstructors
-
.new(log : Log, config : ProjectConfig)
Initializes a new
Project
.
Instance Method Summary
-
#check_for_event(event : Event)
Checks for an event and handles it if the event type is registered.
-
#events : Hash(String, BaseEvent)
Provides read access to the
#events
instance variable. -
#name : String
Provides read access to the name of the project.
Constructor Detail
Initializes a new Project
.
@param log [Log] The logger to use. @param config [ProjectConfig] The configuration for the project.
Instance Method Detail
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.
Provides read access to the #events
instance variable.
@return [Hash(String, BaseEvent)] A hash mapping event types to event handlers.
Provides read access to the name of the project. @return [String] The name of the project.