Sha256: c9a4a19e27d502a7c7b7540a0d8eb2a67ba13f8a7d1f12e87276e137c6dd06bd

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveSteps
        module Entities
          class Method
            module Entities
              module Callers
                class Raw < Callers::Base
                  def calculate_value(method)
                    raw_value.unwrap
                  end

                  def validate_as_input_for_container!(container, method:)
                    true
                  end

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

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

                  private

                  alias_method :raw_value, :object
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.16.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/raw.rb