Sha256: e3467066b0ab526f4681dc58c4464a749d01cc58e1c985c26bbb0b5c34b232b8

Contents?: true

Size: 416 Bytes

Versions: 7

Compression:

Stored size: 416 Bytes

Contents

module Ucasy
  class Flow < Base
    class << self
      def service_classes(*service_classes)
        @service_classes = service_classes
      end
      alias_method :flow, :service_classes

      def _service_classes
        @service_classes || []
      end
    end

    def call
      self.class._service_classes.each do |service_class|
        service_class.call(context)
      end

      self
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ucasy-0.1.0 lib/ucasy/flow.rb
ucasy-0.0.7 lib/ucasy/flow.rb
ucasy-0.0.6 lib/ucasy/flow.rb
ucasy-0.0.5 lib/ucasy/flow.rb
ucasy-0.0.4 lib/ucasy/flow.rb
ucasy-0.0.3 lib/ucasy/flow.rb
ucasy-0.0.1 lib/ucasy/flow.rb