Build the scenario steps provided

 @param [Array<String>] steps A collection of steps to build the scenario
760912
def build(steps)
      raise ArgumentError, "Must provide scenario steps" unless steps
      steps.each_with_index do |step, index|
        begin
          instruction, args = step.split ' ', 2
          args = split_quoted_string args
          if args && !args.empty?
            self.__send__ instruction, *args
          else
            self.__send__ instruction
          end
        rescue => e
          @errors << {step: index + 1, message: "#{step}: #{e.message}"}
        end
      end
    end
1100980
public function steps($steps)
    {
        if ( ! is_array($steps)) {
            $steps = [ $steps ];
        }

        $this->steps = $steps;

        return $this;
    }
1090201
private boolean step(final Collection<Select> _selects)
    {
        boolean ret = !CollectionUtils.isEmpty(_selects);
        for (final Select select : _selects) {
            ret = ret && select.next();
        }
        return ret;
    }
359505
def stepBy(self, steps):
        
        self.setValue(self.value() + steps*self.singleStep())
1039031
def after_feature_element(cuke_feature_element)
      if cuke_feature_element.is_a?(Cucumber::Formatter::LegacyApi::Ast::Scenario)
        after_scenario(cuke_feature_element)
      elsif cuke_feature_element.is_a?(Cucumber::Formatter::LegacyApi::Ast::ScenarioOutline)
        after_scenario_outline(cuke_feature_element)
      else
        raise("unsupported feature element `#{cuke_feature_element.class.name}`")
      end

      @exception = nil
      @scenario = nil
      @scenario_outline = nil
    end
498475
public void initialiseParamValues(final Step step) {
        final HashMap<String, String> map = new HashMap<String, String>();

        final String[] paramValues = Util.getArgs(this.parent.getPattern(),
            step.getLine(), null);

        if (paramValues != null) {
            for (int i = 0; i < paramValues.length; i++) {
                map.put(this.parent.getParamNames().get(i), paramValues[i]);
            }
        }
        this.paramValueMap = new ExampleParameter(step.getSourceLineNumber(),
            map);
    }
311828
def move_to_step(self, step):
        
        if step not in self._scenario_steps.keys():
            raise UndefinedState("step {} not defined in scenario".format(step))
        try:
            session_id = session.sessionId
            self.session_machines.set_state(session_id, step)
        except UninitializedStateMachine as e:
            logger.error(e)
            return statement(INTERNAL_ERROR_MSG)
622577
def adapt_step_table!(parsed_step_table, gathered_comments)
      # Saving off the original data
      parsed_step_table['cuke_modeler_parsing_data'] = Marshal::load(Marshal.dump(parsed_step_table['rows']))

      # Removing parsed data for child elements in order to avoid duplicating data
      parsed_step_table['cuke_modeler_parsing_data'].clear


      parsed_step_table['line'] = parsed_step_table['rows'].first['line']

      parsed_step_table['rows'].each do |row|
        adapt_table_row!(row, gathered_comments)
      end
    end
420106
def follow_path( steps, past_steps = [] )
      if steps.is_a?( Hash )
        steps.each do |step, next_steps|
          path_to_this_point = [past_steps, step].flatten
          reflection = reflection_for( path_to_this_point ) rescue nil
          if reflection
            follow_path( next_steps, path_to_this_point )
          else
            follow_comparison( next_steps, past_steps, step )
          end
        end
      elsif steps.is_a?( Array ) && steps.length == 2
        if reflection_for( past_steps )
          follow_comparison( steps, past_steps, :id )
        else
          follow_comparison( steps, past_steps[0..-2], past_steps[-1] )
        end
      else
        raise "invalid obligation path #{[past_steps, steps].inspect}"
      end
    end
1099980
def add_branch(steps, source_line, ruby_code = nil)
      branches << Branch.new(steps, source_line, ruby_code)
    end
284601
def _generate(cls, strategy, params):
        
        if cls._meta.abstract:
            raise errors.FactoryError(
                "Cannot generate instances of abstract factory %(f)s; "
                "Ensure %(f)s.Meta.model is set and %(f)s.Meta.abstract "
                "is either not set or False." % dict(f=cls.__name__))

        step = builder.StepBuilder(cls._meta, params, strategy)
        return step.build()
363521
@JavaScriptMethod
    public JSONArray getScenarioList() {
        JSONArray scenarioList = new JSONArray();
        for (String scenarioName : _projectResult.getScenarioResults().keySet()) {
            JSONObject scenario = new JSONObject();
            scenario.put("ScenarioName", scenarioName);
            scenarioList.add(scenario);
        }
        return scenarioList;
    }
595879
private void setLocation(List<Step> steps) {
		List<Location> sublocations = new ArrayList<Location>();
		int start = 0, step = 0, oStep = numBefore+numAfter, oMax = this.original.getLength(), pStep = 0, pMax =
				(prev == null) ? 0 : prev.getLength();
		boolean inGap = true;

		// build sublocations: pieces of sequence separated by gaps
		for (; step < length; step++) {
			boolean isGapStep = (steps.get(step) == Step.GAP),
					isGapPrev = (pStep < pMax && prev.isGap(pStep + 1));
			if (!isGapStep && !isGapPrev) {
				oStep++;
				if (inGap) {
					inGap = false;
					start = step + 1;
				}
			} else if (!inGap) {
				inGap = true;
				sublocations.add(new SimpleLocation(start, step, Strand.UNDEFINED));
			}
			if (prev != null && !isGapStep) {
				pStep++;
			}
		}
		if (!inGap) {
			sublocations.add(new SimpleLocation(start, step, Strand.UNDEFINED));
		}

		// combine sublocations into 1 Location
		if (sublocations.size() == 0) {
			location = null;
		} else if (sublocations.size() == 1) {
			location = sublocations.get(0);
		} else {
			location = new SimpleLocation(sublocations.get(0).getStart(), sublocations.get(sublocations.size() - 1).getEnd(),
					Strand.UNDEFINED,
					false, sublocations);
		}
		// TODO handle circular alignments

		// check that alignment has correct number of compounds in it to fit original sequence
		if (step != length || oStep != oMax || pStep != pMax) {
			throw new IllegalArgumentException("Given sequence does not fit in alignment.");
		}
	}
1364832
def run_steps(node: Node, pipeline: RenderingPipeline, **args):
    """"""
    for step in pipeline.steps:
        result = step(node, pipeline=pipeline, **args)
        if isinstance(result, dict):
            args = {**args, **result}
1249936
def build_graph(steps):
    

    graph = Graph()

    for step in steps:
        graph.add_step(step)

    for step in steps:
        for dep in step.requires:
            graph.connect(step.name, dep)

        for parent in step.required_by:
            graph.connect(parent, step.name)

    return graph
1227347
public void addStep(DeploymentOperationStep step) {
    if(currentStep != null) {
      steps.add(steps.indexOf(currentStep)+1, step);
    } else {
      steps.add(step);
    }
  }
926372
def add_scenario(self, parameter: 'Parameter', scenario_name: str = default_scenario):
        
        self.scenarios[scenario_name] = parameter