Sha256: 814ccfcdecddfdac1d1368c67d505665eb6035f55b80f43d18b0d9dc3a898c81
Contents?: true
Size: 819 Bytes
Versions: 160
Compression:
Stored size: 819 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/common_constructor/instance_initialize' require 'eac_ruby_utils/common_constructor/super_args' module EacRubyUtils class CommonConstructor class ClassInitialize attr_reader :common_constructor, :klass def initialize(common_constructor, klass) @common_constructor = common_constructor @klass = klass end def run class_initialize = self klass.send(:define_method, :initialize) do |*args| ::EacRubyUtils::CommonConstructor::InstanceInitialize.new( class_initialize.common_constructor, args, self ).run super(*::EacRubyUtils::CommonConstructor::SuperArgs.new( class_initialize, args, self ).result) end end end end end
Version data entries
160 entries across 160 versions & 4 rubygems