Sha256: fce4ee8cf5327d9aedb866f77c14f8ec0b60016f6ac26a75cf62c90a07f43ff2

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module Dynflow
  module Flows
    class Atom < Abstract
      attr_reader :step_id

      def encode
        step_id
      end

      def initialize(step_id)
        @step_id = Type! step_id, Integer
      end

      def size
        1
      end

      def all_step_ids
        [step_id]
      end

      def flatten!
        # nothing to do
      end

      protected

      def self.new_from_hash(hash)
        check_class_matching hash
        new(hash[:step_id])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynflow-1.9.0 lib/dynflow/flows/atom.rb
dynflow-1.8.3 lib/dynflow/flows/atom.rb