Class: Event
- Inherits:
-
Object
- Object
- Event
- Defined in:
- app/models/event.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#name ⇒ Object
Returns the value of attribute name.
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
- #as_json ⇒ Object
- #execute ⇒ Object
-
#initialize(data) ⇒ Event
constructor
A new instance of Event.
Constructor Details
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
2 3 4 |
# File 'app/models/event.rb', line 2 def data @data end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'app/models/event.rb', line 2 def name @name end |
#project ⇒ Object
Returns the value of attribute project.
2 3 4 |
# File 'app/models/event.rb', line 2 def project @project end |
Instance Method Details
#as_json ⇒ Object
20 21 22 |
# File 'app/models/event.rb', line 20 def as_json data end |
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/models/event.rb', line 10 def execute return nil unless project.enabled_pipelines project.enabled_pipelines.each do |pipeline_definition| if pipeline_definition.constantize.trigger_when?(self) PipelineRunnerJob.perform_later(nil, self.data, pipeline_definition) end end end |