Sha256: 6da8f0cc11c5bb9ea35804fab8ce957fa8a1e3a77f93e3f993766c9ebddca50d

Contents?: true

Size: 718 Bytes

Versions: 5

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

##
# WIP: Factory API is NOT well-thought yet. It will be revisited and completely refactored at any time.
#
module ConvenientService
  module Factories
    module Step
      module Instance
        ##
        # @return [ConvenientService::Service::Plugins::HasResultSteps::Entities::Step]
        #
        def create_step_instance
          service_class =
            ::Class.new do
              include ::ConvenientService::Configs::Standard

              step :result

              def result
                success
              end
            end

          service_instance = service_class.new

          service_instance.steps.first
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.10.1 lib/convenient_service/factories/step/instance.rb
convenient_service-0.10.0 lib/convenient_service/factories/step/instance.rb
convenient_service-0.9.0 lib/convenient_service/factories/step/instance.rb
convenient_service-0.8.0 lib/convenient_service/factories/step/instance.rb
convenient_service-0.7.0 lib/convenient_service/factories/step/instance.rb