Class: Pipeline

Inherits:
ApplicationRecord show all
Defined in:
app/models/pipeline.rb

Instance Method Summary collapse

Instance Method Details

#definition_classObject



5
6
7
# File 'app/models/pipeline.rb', line 5

def definition_class
  @definition_class ||= definition.constantize
end

#eventObject



17
18
19
# File 'app/models/pipeline.rb', line 17

def event
  @event ||= Event.new(super)
end

#run(event = nil) ⇒ Object



13
14
15
# File 'app/models/pipeline.rb', line 13

def run(event=nil)
  PipelineRunnerJob.perform_later(self, event)
end

#status?(is) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/pipeline.rb', line 9

def status?(is)
  status && status.upcase == is.to_s.upcase
end