Sha256: 2dbd59c0f63c84e14d6fec3a7290ca41f90a504e039806ca8936c14672d77758

Contents?: true

Size: 638 Bytes

Versions: 10

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true
module Dynflow
  module Flows

    class Abstract < Serializable
      include Algebrick::TypeCheck

      def initialize
        raise 'cannot instantiate Flows::Abstract'
      end

      def to_hash
        { :class => self.class.name }
      end

      def empty?
        self.size == 0
      end

      def size
        raise NotImplementedError
      end

      def includes_step?(step_id)
        self.all_step_ids.any? { |s| s == step_id }
      end

      def all_step_ids
        raise NotImplementedError
      end

      def flatten!
        raise NotImplementedError
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dynflow-1.4.9 lib/dynflow/flows/abstract.rb
dynflow-1.4.8 lib/dynflow/flows/abstract.rb
dynflow-1.4.7 lib/dynflow/flows/abstract.rb
dynflow-1.4.6 lib/dynflow/flows/abstract.rb
dynflow-1.4.5 lib/dynflow/flows/abstract.rb
dynflow-1.4.4 lib/dynflow/flows/abstract.rb
dynflow-1.4.3 lib/dynflow/flows/abstract.rb
dynflow-1.4.2 lib/dynflow/flows/abstract.rb
dynflow-1.4.1 lib/dynflow/flows/abstract.rb
dynflow-1.4.0 lib/dynflow/flows/abstract.rb