Sha256: d7c2bff11b285e98864ea4d6ec092e1ec3bd23dfd894ac7c7bb041c33d9bf58a

Contents?: true

Size: 1.08 KB

Versions: 13

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasResultSteps
        module Entities
          class Method
            module Entities
              module Callers
                class Proc < Callers::Base
                  def calculate_value(method)
                    method.organizer.instance_exec(&proc)
                  end

                  def validate_as_input_for_container!(container, method:)
                    true
                  end

                  def validate_as_output_for_container!(container, method:)
                    ##
                    # TODO: Better error message.
                    #
                    raise Errors::OutputMethodProc.new(method: method, container: container)
                  end

                  def define_output_in_container!(container, index:, method:)
                    true
                  end

                  private

                  alias_method :proc, :object
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
convenient_service-0.10.1 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.10.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.9.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.8.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.7.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.6.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.5.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.4.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.3.1 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.3.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.2.1 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.2.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb
convenient_service-0.1.0 lib/convenient_service/service/plugins/has_result_steps/entities/method/entities/callers/proc.rb