Class: Orchestrated::CompletionExpression

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/orchestrated/completion.rb

Overview

a little ditty to support the completion algebra a composite! Completion is used as a prerequisite (prerequisites) for message passing

Instance Method Summary collapse

Instance Method Details

#always_complete?Boolean

for static analysis

Returns:

  • (Boolean)

14
# File 'lib/orchestrated/completion.rb', line 14

def always_complete?; throw 'subclass must override!';end

#canceled?Boolean

Returns:

  • (Boolean)

16
# File 'lib/orchestrated/completion.rb', line 16

def canceled?; throw 'subclass must override!';end

#complete?Boolean

Returns:

  • (Boolean)

12
# File 'lib/orchestrated/completion.rb', line 12

def complete?; throw 'subclass must override!';end

#never_complete?Boolean

Returns:

  • (Boolean)

15
# File 'lib/orchestrated/completion.rb', line 15

def never_complete?; throw 'subclass must override!';end

#notify_dependents_of_cancellationObject


22
23
24
25
# File 'lib/orchestrated/completion.rb', line 22

def notify_dependents_of_cancellation
  # NB: we are notifying the Join Model here (it keeps track of status)
  dependent_associations.each{|d| d.prerequisite_canceled}
end

#notify_dependents_of_completionObject


18
19
20
21
# File 'lib/orchestrated/completion.rb', line 18

def notify_dependents_of_completion
  # NB: we are notifying the Join Model here (it keeps track of status)
  dependent_associations.each{|d| d.prerequisite_completed}
end

#prerequisite_completeObject


17
# File 'lib/orchestrated/completion.rb', line 17

def prerequisite_complete; throw 'subclass must override!';end