Sha256: 110db5462cf09d719b4db79cb86bf52db410be9c2d3d2ec2d1bad404e0eb3a3c
Contents?: true
Size: 1.55 KB
Versions: 2
Compression:
Stored size: 1.55 KB
Contents
# frozen_string_literal: true require_relative "reassignment/commands" module ConvenientService module Service module Plugins module CanHaveSteps module Entities class Method module Entities module Callers class Reassignment < Callers::Base def reassignment?(name) ## # TODO: A better name for `object`. Wrapped object, `target`? # object.to_sym == name.to_sym end ## # TODO: Separate `in` and `out` methods? # def calculate_value(method) raise Errors::CallerCanNotCalculateReassignment.new(method: method) end def validate_as_input_for_container!(container, method:) raise Errors::InputMethodReassignment.new(method: method, container: container) end def validate_as_output_for_container!(container, method:) ## # TODO: Raise when container has two reassignments with same name. # true end def define_output_in_container!(container, index:, method:) Commands::DefineMethodInContainer.call(method: method, container: container, index: index) end end end end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems