Sha256: 366b6c8bad437d2837fc2c3d5e21d11317226c06c98555dc2f0c529804bb0591

Contents?: true

Size: 803 Bytes

Versions: 8

Compression:

Stored size: 803 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasResultMethodSteps
        module Services
          class RunMethodInOrganizer
            include MethodStepConfig

            attr_reader :method_name, :organizer, :kwargs

            def initialize(method_name:, organizer:, **kwargs)
              @method_name = method_name
              @organizer = organizer
              @kwargs = kwargs
            end

            def result
              ##
              # NOTE: `kwargs` are intentionally NOT passed, since all the corresponding methods are available inside `organizer.__send__(method_name)` body.
              #
              organizer.__send__(method_name)
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.6.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.5.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.4.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.3.1 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.3.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.2.1 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.2.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb
convenient_service-0.1.0 lib/convenient_service/service/plugins/has_result_method_steps/services/run_method_in_organizer.rb