Sha256: 83c9b997c1e0c2509cc4d676b79e9e77a702802065286e35d9801ec8f98d31b5

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveSteps
        module Entities
          class Method
            module Entities
              module Callers
                class Base
                  include Support::AbstractMethod
                  include Support::Copyable

                  ##
                  # TODO: A better name for `object`. Wrapped object, `target`?
                  #
                  attr_reader :object

                  abstract_method \
                    :calculate_value,
                    :validate_as_input_for_container!,
                    :validate_as_output_for_container!,
                    :define_output_in_container!

                  def initialize(object)
                    @object = object
                  end

                  def reassignment?(name)
                    false
                  end

                  def ==(other)
                    return unless other.instance_of?(self.class)

                    return false if object != other.object

                    true
                  end

                  def to_args
                    [object]
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/base.rb
convenient_service-0.11.0 lib/convenient_service/service/plugins/can_have_steps/entities/method/entities/callers/base.rb