Sha256: d4ddff5e43601f27af697ddd9f30ae0f767abd770eca4986c2dc20fd4caace80

Contents?: true

Size: 903 Bytes

Versions: 5

Compression:

Stored size: 903 Bytes

Contents

# -*- coding: utf-8 -*-
# 以下のジョブネットについてテンプレートジョブネットや
# 実行用ジョブネットを扱うフィクスチャ生成のためのクラスです。
#
# in [rjn0008]
# (S1) --e1-->(rjn0001)--e2-->(rjn0002)--e3-->(E1)

class Rjn0008ExpansionFixture < JobnetFixtureBuilder
  DSL = <<-EOS
    jobnet("rjn0008") do
      auto_sequence
      expansion("rjn0001")
      expansion("rjn0002")
    end
  EOS

  def create(options = {})
    root = new_root_jobnet("rjn0008", options)
    root.children << Tengine::Job::Start.new
    root.children << new_expansion("rjn0001")
    root.children << new_expansion("rjn0002")
    root.prepare_end
    root.build_sequencial_edges
    root.save!
    self[:S1] = root.children[0]
    self[:E1] = root.children[3]
    self[:e1] = root.edges[0]
    self[:e2] = root.edges[1]
    self[:e3] = root.edges[2]
    root
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tengine_job-0.6.13 spec/fixtures/rjn_0008_expansion_fixture.rb
tengine_job-0.6.12 spec/fixtures/rjn_0008_expansion_fixture.rb
tengine_job-0.6.11 spec/fixtures/rjn_0008_expansion_fixture.rb
tengine_job-0.6.10 spec/fixtures/rjn_0008_expansion_fixture.rb
tengine_job-0.6.9 spec/fixtures/rjn_0008_expansion_fixture.rb