lib/avalon/workflow/workflow_datastream.rb
# Return true if the step is current or prior to the parameter passed in
# Defaults to false if the step is not recognized
Return true if the step is current or prior to the parameter passed in
Defaults to false if the step is not recognized
Return true if the step is current or prior to the parameter passed in Defaults to false if the step is not recognized
def completed?(step_name)
        status_flag = published? || false
        unless published?
          step_index = HYDRANT_STEPS.index(step_name)
          current_index = HYDRANT_STEPS.index(step_name)
          last_index = HYDRANT_STEPS.index(last_completed_step.first)
          unless (current_index.nil? or last_index.nil?)
            status_flag = (last_index >= current_index)
          end
        end
        status_flag
      end
def completed? ( step_name ) status_flag = published? || false unless published? step_index = HYDRANT_STEPS . index ( step_name ) current_index = HYDRANT_STEPS . index ( step_name ) last_index = HYDRANT_STEPS . index ( last_completed_step . first ) unless ( current_index . nil? or last_index . nil? ) status_flag = ( last_index >= current_index ) end end status_flag end
Return true if the step is current or prior to the parameter passed in
Defaults to false if the step is not recognized
Return true if the step is current or prior to the parameter passed in Defaults to false if the step is not recognized
step_name